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

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

Issue 18199003: Allow Chrome OS login profile to have different default pref values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 5 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
« no previous file with comments | « chrome/browser/ui/sync/sync_promo_ui.h ('k') | chrome/browser/ui/tabs/pinned_tab_codec.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/sync_promo_ui.h" 5 #include "chrome/browser/ui/sync/sync_promo_ui.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 // Display the signin promo if the user is not signed in. 108 // Display the signin promo if the user is not signed in.
109 SigninManager* signin = SigninManagerFactory::GetForProfile( 109 SigninManager* signin = SigninManagerFactory::GetForProfile(
110 profile->GetOriginalProfile()); 110 profile->GetOriginalProfile());
111 return !signin->AuthInProgress() && signin->IsSigninAllowed() && 111 return !signin->AuthInProgress() && signin->IsSigninAllowed() &&
112 signin->GetAuthenticatedUsername().empty(); 112 signin->GetAuthenticatedUsername().empty();
113 #endif 113 #endif
114 } 114 }
115 115
116 // static 116 // static
117 void SyncPromoUI::RegisterUserPrefs( 117 void SyncPromoUI::RegisterProfilePrefs(
118 user_prefs::PrefRegistrySyncable* registry) { 118 user_prefs::PrefRegistrySyncable* registry) {
119 registry->RegisterIntegerPref( 119 registry->RegisterIntegerPref(
120 prefs::kSyncPromoStartupCount, 120 prefs::kSyncPromoStartupCount,
121 0, 121 0,
122 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 122 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
123 registry->RegisterBooleanPref( 123 registry->RegisterBooleanPref(
124 prefs::kSyncPromoUserSkipped, 124 prefs::kSyncPromoUserSkipped,
125 false, 125 false,
126 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 126 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
127 registry->RegisterBooleanPref( 127 registry->RegisterBooleanPref(
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 replacements.ClearQuery(); 266 replacements.ClearQuery();
267 const std::string& locale = g_browser_process->GetApplicationLocale(); 267 const std::string& locale = g_browser_process->GetApplicationLocale();
268 return url.ReplaceComponents(replacements) == 268 return url.ReplaceComponents(replacements) ==
269 GURL(base::StringPrintf(kSyncLandingUrlPrefix, locale.c_str())); 269 GURL(base::StringPrintf(kSyncLandingUrlPrefix, locale.c_str()));
270 } 270 }
271 271
272 // static 272 // static
273 void SyncPromoUI::ForceWebBasedSigninFlowForTesting(bool force) { 273 void SyncPromoUI::ForceWebBasedSigninFlowForTesting(bool force) {
274 g_force_web_based_signin_flow = force; 274 g_force_web_based_signin_flow = force;
275 } 275 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/sync/sync_promo_ui.h ('k') | chrome/browser/ui/tabs/pinned_tab_codec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698