update_engine: Fix all the "using" declaration usage.
This patch removes unused "using" declarations, that is, declarations
included in a .cc file at a global scope such that "using foo::bar"
that later don't use the identifier "bar" at all.
This also unifies the usage of these identifiers in the .cc files
in favor of using the short name defined by the using declaration.
For example, in several cases the .h refer to a type like
"std::string" because using declarations are forbidden in header
files while the .cc includes "using std::string;" with the purpose
of just writting "string" in the .cc file. Very rarely, the full
identifier is used when a local name ocludes it, for example,
StringVectorToGStrv() and StringVectorToString() in utils.cc named
its argument just "vector" need to refer to std::vector with the
full name. This patch renames those arguments instead.
Finally, it also sorts a few lists of using declarations that weren't
in order.
BUG=None
TEST=FEATURES=test emerge-link update_engine
Change-Id: I30f6b9510ecb7e03640f1951c48d5bb106309840
Reviewed-on: https://chromium-review.googlesource.com/226423
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
diff --git a/omaha_request_action_unittest.cc b/omaha_request_action_unittest.cc
index 872b83b..775f074 100644
--- a/omaha_request_action_unittest.cc
+++ b/omaha_request_action_unittest.cc
@@ -30,15 +30,15 @@
using base::TimeDelta;
using std::string;
using std::vector;
-using testing::_;
using testing::AllOf;
+using testing::AnyNumber;
using testing::DoAll;
using testing::Ge;
using testing::Le;
using testing::NiceMock;
using testing::Return;
using testing::SetArgumentPointee;
-using testing::AnyNumber;
+using testing::_;
namespace chromeos_update_engine {
@@ -80,7 +80,7 @@
void PingTest(bool ping_only);
// InstallDate test helper function.
- bool InstallDateParseHelper(const std::string &elapsed_days,
+ bool InstallDateParseHelper(const string &elapsed_days,
OmahaResponse *response);
// P2P test helper function.
@@ -273,10 +273,10 @@
CHECK(false);
}
// Debugging/logging
- static std::string StaticType() {
+ static string StaticType() {
return "OutputObjectCollectorAction";
}
- std::string Type() const { return StaticType(); }
+ string Type() const { return StaticType(); }
bool has_input_object_;
OmahaResponse omaha_response_;
};
@@ -2057,9 +2057,8 @@
""); // expected_p2p_url
}
-bool OmahaRequestActionTest::InstallDateParseHelper(
- const std::string &elapsed_days,
- OmahaResponse *response) {
+bool OmahaRequestActionTest::InstallDateParseHelper(const string &elapsed_days,
+ OmahaResponse *response) {
return
TestUpdateCheck(nullptr, // request_params
GetUpdateResponse2(OmahaRequestParams::kAppId,