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

Side by Side Diff: chrome/browser/sync/profile_sync_service_session_unittest.cc

Issue 12502017: signin: pull basic SigninManager functionality into new SigninManagerBase class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: deal with new enterprise_platform_keys_private_api Created 7 years, 8 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 #include <map> 5 #include <map>
6 #include <string> 6 #include <string>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 namespace browser_sync { 68 namespace browser_sync {
69 69
70 namespace { 70 namespace {
71 71
72 class FakeProfileSyncService : public TestProfileSyncService { 72 class FakeProfileSyncService : public TestProfileSyncService {
73 public: 73 public:
74 FakeProfileSyncService( 74 FakeProfileSyncService(
75 ProfileSyncComponentsFactory* factory, 75 ProfileSyncComponentsFactory* factory,
76 Profile* profile, 76 Profile* profile,
77 SigninManager* signin, 77 SigninManagerBase* signin,
78 ProfileSyncService::StartBehavior behavior, 78 ProfileSyncService::StartBehavior behavior,
79 bool synchronous_backend_initialization) 79 bool synchronous_backend_initialization)
80 : TestProfileSyncService(factory, 80 : TestProfileSyncService(factory,
81 profile, 81 profile,
82 signin, 82 signin,
83 behavior, 83 behavior,
84 synchronous_backend_initialization) {} 84 synchronous_backend_initialization) {}
85 virtual ~FakeProfileSyncService() {} 85 virtual ~FakeProfileSyncService() {}
86 86
87 virtual scoped_ptr<DeviceInfo> GetLocalDeviceInfo() const OVERRIDE { 87 virtual scoped_ptr<DeviceInfo> GetLocalDeviceInfo() const OVERRIDE {
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 MessageLoop::current()->RunUntilIdle(); 254 MessageLoop::current()->RunUntilIdle();
255 io_thread_.Stop(); 255 io_thread_.Stop();
256 MessageLoop::current()->RunUntilIdle(); 256 MessageLoop::current()->RunUntilIdle();
257 BrowserWithTestWindowTest::TearDown(); 257 BrowserWithTestWindowTest::TearDown();
258 } 258 }
259 259
260 bool StartSyncService(const base::Closure& callback, 260 bool StartSyncService(const base::Closure& callback,
261 bool will_fail_association) { 261 bool will_fail_association) {
262 if (sync_service_.get()) 262 if (sync_service_.get())
263 return false; 263 return false;
264 SigninManager* signin = SigninManagerFactory::GetForProfile(profile()); 264 SigninManagerBase* signin =
265 SigninManagerFactory::GetForProfile(profile());
265 signin->SetAuthenticatedUsername("test_user"); 266 signin->SetAuthenticatedUsername("test_user");
266 ProfileSyncComponentsFactoryMock* factory = 267 ProfileSyncComponentsFactoryMock* factory =
267 new ProfileSyncComponentsFactoryMock(); 268 new ProfileSyncComponentsFactoryMock();
268 sync_service_.reset(new FakeProfileSyncService( 269 sync_service_.reset(new FakeProfileSyncService(
269 factory, 270 factory,
270 profile(), 271 profile(),
271 signin, 272 signin,
272 ProfileSyncService::AUTO_START, 273 ProfileSyncService::AUTO_START,
273 false)); 274 false));
274 sync_service_->set_backend_init_callback(callback); 275 sync_service_->set_backend_init_callback(callback);
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 sync_pb::SessionSpecifics specifics; 1247 sync_pb::SessionSpecifics specifics;
1247 header.SetSessionSpecifics(specifics); 1248 header.SetSessionSpecifics(specifics);
1248 } 1249 }
1249 // Ensure we associate properly despite the pre-existing node with our local 1250 // Ensure we associate properly despite the pre-existing node with our local
1250 // tag. 1251 // tag.
1251 error = model_associator_->AssociateModels(NULL, NULL); 1252 error = model_associator_->AssociateModels(NULL, NULL);
1252 ASSERT_FALSE(error.IsSet()); 1253 ASSERT_FALSE(error.IsSet());
1253 } 1254 }
1254 1255
1255 } // namespace browser_sync 1256 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698