Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Unified Diff: components/invalidation/invalidation_test_util.cc

Issue 400073003: Finish decoupling sync and invalidations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix GN Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/invalidation/invalidation_test_util.h ('k') | components/invalidation/invalidation_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/invalidation/invalidation_test_util.cc
diff --git a/sync/internal_api/public/base/invalidation_test_util.cc b/components/invalidation/invalidation_test_util.cc
similarity index 83%
rename from sync/internal_api/public/base/invalidation_test_util.cc
rename to components/invalidation/invalidation_test_util.cc
index 3c610dadedc1e5ff3222a82d4f0f25b02b19c9a6..c1684774ef3939acfd574cbf419eb391886eb08f 100644
--- a/sync/internal_api/public/base/invalidation_test_util.cc
+++ b/components/invalidation/invalidation_test_util.cc
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "sync/internal_api/public/base/invalidation_test_util.h"
+#include "components/invalidation/invalidation_test_util.h"
#include "base/basictypes.h"
#include "base/json/json_writer.h"
#include "base/json/string_escape.h"
#include "base/values.h"
-#include "sync/internal_api/public/base/invalidation.h"
+#include "components/invalidation/invalidation.h"
namespace syncer {
@@ -20,8 +20,7 @@ using ::testing::PrintToString;
namespace {
-class AckHandleEqMatcher
- : public MatcherInterface<const AckHandle&> {
+class AckHandleEqMatcher : public MatcherInterface<const AckHandle&> {
public:
explicit AckHandleEqMatcher(const AckHandle& expected);
@@ -53,8 +52,7 @@ void AckHandleEqMatcher::DescribeNegationTo(::std::ostream* os) const {
*os << " isn't equal to " << PrintToString(expected_);
}
-class InvalidationEqMatcher
- : public MatcherInterface<const Invalidation&> {
+class InvalidationEqMatcher : public MatcherInterface<const Invalidation&> {
public:
explicit InvalidationEqMatcher(const Invalidation& expected);
@@ -69,12 +67,13 @@ class InvalidationEqMatcher
DISALLOW_COPY_AND_ASSIGN(InvalidationEqMatcher);
};
-InvalidationEqMatcher::InvalidationEqMatcher(
- const Invalidation& expected) : expected_(expected) {
+InvalidationEqMatcher::InvalidationEqMatcher(const Invalidation& expected)
+ : expected_(expected) {
}
bool InvalidationEqMatcher::MatchAndExplain(
- const Invalidation& actual, MatchResultListener* listener) const {
+ const Invalidation& actual,
+ MatchResultListener* listener) const {
if (!(expected_.object_id() == actual.object_id())) {
return false;
}
@@ -84,8 +83,8 @@ bool InvalidationEqMatcher::MatchAndExplain(
return false;
} else {
// Neither is unknown version.
- return expected_.payload() == actual.payload()
- && expected_.version() == actual.version();
+ return expected_.payload() == actual.payload() &&
+ expected_.version() == actual.version();
}
}
@@ -99,7 +98,7 @@ void InvalidationEqMatcher::DescribeNegationTo(::std::ostream* os) const {
} // namespace
-void PrintTo(const AckHandle& ack_handle, ::std::ostream* os ) {
+void PrintTo(const AckHandle& ack_handle, ::std::ostream* os) {
scoped_ptr<base::Value> value(ack_handle.ToValue());
std::string printable_ack_handle;
base::JSONWriter::Write(value.get(), &printable_ack_handle);
« no previous file with comments | « components/invalidation/invalidation_test_util.h ('k') | components/invalidation/invalidation_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698