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

Side by Side Diff: chrome/browser/sync/sessions/sync_session_unittest.cc

Issue 7621085: Server directed error handling backend code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: upload before commit. Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/sync/sessions/sync_session.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/sync/sessions/sync_session.h" 5 #include "chrome/browser/sync/sessions/sync_session.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/tracked.h" 9 #include "base/tracked.h"
10 #include "chrome/browser/sync/engine/conflict_resolver.h" 10 #include "chrome/browser/sync/engine/conflict_resolver.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 const base::TimeDelta& new_interval) OVERRIDE { 64 const base::TimeDelta& new_interval) OVERRIDE {
65 FailControllerInvocationIfDisabled("OnReceivedShortPollIntervalUpdate"); 65 FailControllerInvocationIfDisabled("OnReceivedShortPollIntervalUpdate");
66 } 66 }
67 virtual void OnReceivedSessionsCommitDelay( 67 virtual void OnReceivedSessionsCommitDelay(
68 const base::TimeDelta& new_delay) OVERRIDE { 68 const base::TimeDelta& new_delay) OVERRIDE {
69 FailControllerInvocationIfDisabled("OnReceivedSessionsCommitDelay"); 69 FailControllerInvocationIfDisabled("OnReceivedSessionsCommitDelay");
70 } 70 }
71 virtual void OnShouldStopSyncingPermanently() OVERRIDE { 71 virtual void OnShouldStopSyncingPermanently() OVERRIDE {
72 FailControllerInvocationIfDisabled("OnShouldStopSyncingPermanently"); 72 FailControllerInvocationIfDisabled("OnShouldStopSyncingPermanently");
73 } 73 }
74 virtual void OnSyncProtocolError(
75 const sessions::SyncSessionSnapshot& snapshot) {
76 FailControllerInvocationIfDisabled("SyncProtocolError");
77 }
74 78
75 // ModelSafeWorkerRegistrar implementation. 79 // ModelSafeWorkerRegistrar implementation.
76 virtual void GetWorkers(std::vector<ModelSafeWorker*>* out) OVERRIDE {} 80 virtual void GetWorkers(std::vector<ModelSafeWorker*>* out) OVERRIDE {}
77 virtual void GetModelSafeRoutingInfo(ModelSafeRoutingInfo* out) OVERRIDE { 81 virtual void GetModelSafeRoutingInfo(ModelSafeRoutingInfo* out) OVERRIDE {
78 out->swap(routes_); 82 out->swap(routes_);
79 } 83 }
80 84
81 StatusController* status() { return session_->status_controller(); } 85 StatusController* status() { return session_->status_controller(); }
82 protected: 86 protected:
83 void FailControllerInvocationIfDisabled(const std::string& msg) { 87 void FailControllerInvocationIfDisabled(const std::string& msg) {
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 EXPECT_EQ(empty_payload, original[syncable::BOOKMARKS]); 477 EXPECT_EQ(empty_payload, original[syncable::BOOKMARKS]);
474 EXPECT_EQ(payload1, original[syncable::PASSWORDS]); 478 EXPECT_EQ(payload1, original[syncable::PASSWORDS]);
475 EXPECT_EQ(payload1, original[syncable::AUTOFILL]); 479 EXPECT_EQ(payload1, original[syncable::AUTOFILL]);
476 EXPECT_EQ(payload2, original[syncable::SESSIONS]); 480 EXPECT_EQ(payload2, original[syncable::SESSIONS]);
477 EXPECT_EQ(payload3, original[syncable::THEMES]); 481 EXPECT_EQ(payload3, original[syncable::THEMES]);
478 } 482 }
479 483
480 } // namespace 484 } // namespace
481 } // namespace sessions 485 } // namespace sessions
482 } // namespace browser_sync 486 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/sessions/sync_session.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698