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

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

Issue 162443004: sync: final pieces to sync deferred initialization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 6 years, 10 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 "base/prefs/pref_service.h" 5 #include "base/prefs/pref_service.h"
6 #include "base/prefs/scoped_user_pref_update.h" 6 #include "base/prefs/scoped_user_pref_update.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/content_settings/cookie_settings.h" 10 #include "chrome/browser/content_settings/cookie_settings.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 first_setup_in_progress_ = in_progress; 173 first_setup_in_progress_ = in_progress;
174 } 174 }
175 175
176 private: 176 private:
177 explicit OneClickTestProfileSyncService(Profile* profile) 177 explicit OneClickTestProfileSyncService(Profile* profile)
178 : TestProfileSyncService( 178 : TestProfileSyncService(
179 NULL, 179 NULL,
180 profile, 180 profile,
181 SigninManagerFactory::GetForProfile(profile), 181 SigninManagerFactory::GetForProfile(profile),
182 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), 182 ProfileOAuth2TokenServiceFactory::GetForProfile(profile),
183 ProfileSyncService::MANUAL_START), 183 browser_sync::MANUAL_START),
184 first_setup_in_progress_(false) {} 184 first_setup_in_progress_(false) {}
185 185
186 bool first_setup_in_progress_; 186 bool first_setup_in_progress_;
187 }; 187 };
188 188
189 } // namespace 189 } // namespace
190 190
191 class OneClickSigninHelperTest : public ChromeRenderViewHostTestHarness { 191 class OneClickSigninHelperTest : public ChromeRenderViewHostTestHarness {
192 public: 192 public:
193 OneClickSigninHelperTest(); 193 OneClickSigninHelperTest();
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 prefs::kSigninAllowed, base::Value::CreateBooleanValue(true)); 839 prefs::kSigninAllowed, base::Value::CreateBooleanValue(true));
840 840
841 // Simulate a policy disabling sync by writing kSyncManaged directly. 841 // Simulate a policy disabling sync by writing kSyncManaged directly.
842 // We should still offer to sign in the browser. 842 // We should still offer to sign in the browser.
843 profile()->GetTestingPrefService()->SetManagedPref( 843 profile()->GetTestingPrefService()->SetManagedPref(
844 prefs::kSyncManaged, base::Value::CreateBooleanValue(true)); 844 prefs::kSyncManaged, base::Value::CreateBooleanValue(true));
845 EXPECT_EQ(OneClickSigninHelper::CAN_OFFER, 845 EXPECT_EQ(OneClickSigninHelper::CAN_OFFER,
846 OneClickSigninHelper::CanOfferOnIOThreadImpl( 846 OneClickSigninHelper::CanOfferOnIOThreadImpl(
847 valid_gaia_url_, &request_, io_data.get())); 847 valid_gaia_url_, &request_, io_data.get()));
848 } 848 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/test_profile_sync_service.cc ('k') | chrome/browser/ui/webui/sync_setup_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698