Include the implemented header first in all projects.

The Google C++ style guide dictates that foo.cc and foo_unittest.cc
should include foo.h in the first place, so missing headers in foo.h
are detected with a compile error of the module implementing them and
not when another module uses them.

This CL sweeps across all the .cc file in platform2 enforcing this.

BUG=None
TEST=cbuildbot amd64-generic

Change-Id: I41835835caba13f54c3c844ecf552eb0e47efa9d
Reviewed-on: https://chromium-review.googlesource.com/228894
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/payload_generator/full_update_generator_unittest.cc b/payload_generator/full_update_generator_unittest.cc
index 559a110..95a40ae 100644
--- a/payload_generator/full_update_generator_unittest.cc
+++ b/payload_generator/full_update_generator_unittest.cc
@@ -2,12 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "update_engine/payload_generator/full_update_generator.h"
+
 #include <string>
 #include <vector>
 
 #include <gtest/gtest.h>
 
-#include "update_engine/payload_generator/full_update_generator.h"
 #include "update_engine/test_utils.h"
 
 using chromeos_update_engine::test_utils::FillWithData;
diff --git a/payload_generator/graph_utils_unittest.cc b/payload_generator/graph_utils_unittest.cc
index 0aed78d..c96927f 100644
--- a/payload_generator/graph_utils_unittest.cc
+++ b/payload_generator/graph_utils_unittest.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "update_engine/payload_generator/graph_utils.h"
+
 #include <utility>
 #include <vector>
 
@@ -9,7 +11,6 @@
 
 #include "update_engine/extent_ranges.h"
 #include "update_engine/payload_constants.h"
-#include "update_engine/payload_generator/graph_utils.h"
 
 using std::make_pair;
 using std::vector;
diff --git a/payload_generator/metadata.cc b/payload_generator/metadata.cc
index 0b4e428..4e0265a 100644
--- a/payload_generator/metadata.cc
+++ b/payload_generator/metadata.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "update_engine/payload_generator/metadata.h"
+
 #include <algorithm>
 #include <string>
 #include <vector>
@@ -17,7 +19,6 @@
 #include "update_engine/payload_generator/delta_diff_generator.h"
 #include "update_engine/payload_generator/ext2_utils.h"
 #include "update_engine/payload_generator/graph_utils.h"
-#include "update_engine/payload_generator/metadata.h"
 #include "update_engine/utils.h"
 
 using base::StringPrintf;
diff --git a/payload_generator/metadata_unittest.cc b/payload_generator/metadata_unittest.cc
index 2ffb338..6bc56b7 100644
--- a/payload_generator/metadata_unittest.cc
+++ b/payload_generator/metadata_unittest.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "update_engine/payload_generator/metadata.h"
+
 #include <ext2fs/ext2fs.h>
 #include <fcntl.h>
 #include <sys/stat.h>
@@ -16,7 +18,6 @@
 
 #include "update_engine/payload_generator/delta_diff_generator.h"
 #include "update_engine/payload_generator/graph_types.h"
-#include "update_engine/payload_generator/metadata.h"
 #include "update_engine/test_utils.h"
 #include "update_engine/utils.h"
 
diff --git a/payload_generator/topological_sort_unittest.cc b/payload_generator/topological_sort_unittest.cc
index c1d19b7..e5e7477 100644
--- a/payload_generator/topological_sort_unittest.cc
+++ b/payload_generator/topological_sort_unittest.cc
@@ -2,13 +2,14 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "update_engine/payload_generator/topological_sort.h"
+
 #include <utility>
 #include <vector>
 
 #include <gtest/gtest.h>
 
 #include "update_engine/payload_generator/graph_types.h"
-#include "update_engine/payload_generator/topological_sort.h"
 
 using std::make_pair;
 using std::vector;