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

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

Issue 1155443009: [Sync] Rename SyncActive to IsSyncActive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More non-android cases. Created 5 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
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 "chrome/browser/signin/profile_oauth2_token_service_factory.h" 9 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
10 #include "chrome/browser/signin/signin_manager_factory.h" 10 #include "chrome/browser/signin/signin_manager_factory.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // Helper routine to be used in conjunction with 49 // Helper routine to be used in conjunction with
50 // BrowserContextKeyedServiceFactory::SetTestingFactory(). 50 // BrowserContextKeyedServiceFactory::SetTestingFactory().
51 static KeyedService* Build(content::BrowserContext* profile) { 51 static KeyedService* Build(content::BrowserContext* profile) {
52 return new OneClickTestProfileSyncService(static_cast<Profile*>(profile)); 52 return new OneClickTestProfileSyncService(static_cast<Profile*>(profile));
53 } 53 }
54 54
55 bool FirstSetupInProgress() const override { 55 bool FirstSetupInProgress() const override {
56 return first_setup_in_progress_; 56 return first_setup_in_progress_;
57 } 57 }
58 58
59 bool SyncActive() const override { return sync_active_; } 59 bool IsSyncActive() const override { return sync_active_; }
60 60
61 void set_first_setup_in_progress(bool in_progress) { 61 void set_first_setup_in_progress(bool in_progress) {
62 first_setup_in_progress_ = in_progress; 62 first_setup_in_progress_ = in_progress;
63 } 63 }
64 64
65 void set_sync_active(bool active) { 65 void set_sync_active(bool active) {
66 sync_active_ = active; 66 sync_active_ = active;
67 } 67 }
68 68
69 private: 69 private:
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 signin_metrics::SOURCE_SETTINGS, false); 240 signin_metrics::SOURCE_SETTINGS, false);
241 CreateSyncObserver(continue_url.spec()); 241 CreateSyncObserver(continue_url.spec());
242 sync_service_->set_first_setup_in_progress(false); 242 sync_service_->set_first_setup_in_progress(false);
243 sync_service_->set_sync_active(true); 243 sync_service_->set_sync_active(true);
244 244
245 EXPECT_CALL(*web_contents_observer_, 245 EXPECT_CALL(*web_contents_observer_,
246 AboutToNavigateRenderFrame(_, _)).Times(0); 246 AboutToNavigateRenderFrame(_, _)).Times(0);
247 sync_service_->NotifyObservers(); 247 sync_service_->NotifyObservers();
248 EXPECT_NE(GURL(kContinueUrl), web_contents()->GetVisibleURL()); 248 EXPECT_NE(GURL(kContinueUrl), web_contents()->GetVisibleURL());
249 } 249 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_sync_observer.cc ('k') | chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698