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

Side by Side Diff: sync/test/engine/syncer_command_test.h

Issue 10520010: Not for review: Support sync init with missing or corrupt store (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Documentation Created 8 years, 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_ 5 #ifndef SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_
6 #define SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_ 6 #define SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 return session_.get(); 116 return session_.get();
117 } 117 }
118 118
119 void ClearSession() { 119 void ClearSession() {
120 session_.reset(); 120 session_.reset();
121 } 121 }
122 122
123 void ResetContext() { 123 void ResetContext() {
124 context_.reset(new sessions::SyncSessionContext( 124 context_.reset(new sessions::SyncSessionContext(
125 mock_server_.get(), directory(), 125 mock_server_.get(), directory(),
126 routing_info_, GetWorkers(), &extensions_activity_monitor_, 126 GetWorkers(), &extensions_activity_monitor_,
127 std::vector<SyncEngineEventListener*>(), 127 std::vector<SyncEngineEventListener*>(),
128 &mock_debug_info_getter_, 128 &mock_debug_info_getter_,
129 &traffic_recorder_)); 129 &traffic_recorder_));
130 context_->set_account_name(directory()->name()); 130 context_->set_account_name(directory()->name());
131 ClearSession(); 131 ClearSession();
132 } 132 }
133 133
134 // Install a MockServerConnection. Resets the context. By default, 134 // Install a MockServerConnection. Resets the context. By default,
135 // the context does not have a MockServerConnection attached. 135 // the context does not have a MockServerConnection attached.
136 void ConfigureMockServerConnection() { 136 void ConfigureMockServerConnection() {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 225
226 virtual void SetUp() OVERRIDE; 226 virtual void SetUp() OVERRIDE;
227 227
228 TestUnrecoverableErrorHandler handler_; 228 TestUnrecoverableErrorHandler handler_;
229 MockDirectory mock_directory_; 229 MockDirectory mock_directory_;
230 }; 230 };
231 231
232 } // namespace browser_sync 232 } // namespace browser_sync
233 233
234 #endif // SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_ 234 #endif // SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698