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

Side by Side Diff: chrome/browser/ui/sync/one_click_signin_sync_observer_unittest.cc

Issue 1310553005: [Sync] Replace ProfileSyncComponentsFactory with SyncClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Really fix GN Created 5 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
« no previous file with comments | « chrome/browser/sync/test_profile_sync_service.cc ('k') | chrome/chrome_tests_unit.gypi » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ui/sync/one_click_signin_sync_observer.h" 5 #include "chrome/browser/ui/sync/one_click_signin_sync_observer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 10 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 first_setup_in_progress_ = in_progress; 64 first_setup_in_progress_ = in_progress;
65 } 65 }
66 66
67 void set_sync_active(bool active) { 67 void set_sync_active(bool active) {
68 sync_active_ = active; 68 sync_active_ = active;
69 } 69 }
70 70
71 private: 71 private:
72 explicit OneClickTestProfileSyncService(Profile* profile) 72 explicit OneClickTestProfileSyncService(Profile* profile)
73 : TestProfileSyncService( 73 : TestProfileSyncService(
74 scoped_ptr<ProfileSyncComponentsFactory>( 74 scoped_ptr<sync_driver::SyncApiComponentFactory>(
75 new ProfileSyncComponentsFactoryMock()), 75 new ProfileSyncComponentsFactoryMock()),
76 profile, 76 profile,
77 SigninManagerFactory::GetForProfile(profile), 77 SigninManagerFactory::GetForProfile(profile),
78 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), 78 ProfileOAuth2TokenServiceFactory::GetForProfile(profile),
79 browser_sync::MANUAL_START), 79 browser_sync::MANUAL_START),
80 first_setup_in_progress_(false), 80 first_setup_in_progress_(false),
81 sync_active_(false) {} 81 sync_active_(false) {}
82 82
83 bool first_setup_in_progress_; 83 bool first_setup_in_progress_;
84 bool sync_active_; 84 bool sync_active_;
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 signin_metrics::SOURCE_SETTINGS, false); 242 signin_metrics::SOURCE_SETTINGS, false);
243 CreateSyncObserver(continue_url.spec()); 243 CreateSyncObserver(continue_url.spec());
244 sync_service_->set_first_setup_in_progress(false); 244 sync_service_->set_first_setup_in_progress(false);
245 sync_service_->set_sync_active(true); 245 sync_service_->set_sync_active(true);
246 246
247 EXPECT_CALL(*web_contents_observer_, 247 EXPECT_CALL(*web_contents_observer_,
248 AboutToNavigateRenderFrame(_, _)).Times(0); 248 AboutToNavigateRenderFrame(_, _)).Times(0);
249 sync_service_->NotifyObservers(); 249 sync_service_->NotifyObservers();
250 EXPECT_NE(GURL(kContinueUrl), web_contents()->GetVisibleURL()); 250 EXPECT_NE(GURL(kContinueUrl), web_contents()->GetVisibleURL());
251 } 251 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/test_profile_sync_service.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698