summaryrefslogtreecommitdiff
path: root/update_manager/update_manager_unittest.cc
diff options
context:
space:
mode:
authorAlex Deymo <deymo@chromium.org>2014-10-30 01:37:48 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-11-01 03:26:34 +0000
commitf329b933db41d26644a97afef928eb1b319d6d99 (patch)
tree33b47e66d6d2d48f1650d7fecda3b0a23e2994bc /update_manager/update_manager_unittest.cc
parentebbe7ef75279183ba3cf055158dbbb3b3b605e0e (diff)
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>
Diffstat (limited to 'update_manager/update_manager_unittest.cc')
-rw-r--r--update_manager/update_manager_unittest.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/update_manager/update_manager_unittest.cc b/update_manager/update_manager_unittest.cc
index a9e4b223..42edc40d 100644
--- a/update_manager/update_manager_unittest.cc
+++ b/update_manager/update_manager_unittest.cc
@@ -35,9 +35,6 @@ using std::string;
using std::tuple;
using std::unique_ptr;
using std::vector;
-using testing::Return;
-using testing::StrictMock;
-using testing::_;
namespace {
@@ -89,7 +86,7 @@ class FailingPolicy : public DefaultPolicy {
}
protected:
- std::string PolicyName() const override { return "FailingPolicy"; }
+ string PolicyName() const override { return "FailingPolicy"; }
private:
int* num_called_p_;
@@ -104,7 +101,7 @@ class LazyPolicy : public DefaultPolicy {
}
protected:
- std::string PolicyName() const override { return "LazyPolicy"; }
+ string PolicyName() const override { return "LazyPolicy"; }
};
// A policy that sleeps for a predetermined amount of time, then checks for a
@@ -137,7 +134,7 @@ class DelayPolicy : public DefaultPolicy {
}
protected:
- std::string PolicyName() const override { return "DelayPolicy"; }
+ string PolicyName() const override { return "DelayPolicy"; }
private:
int sleep_secs_;