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

Side by Side Diff: chrome/browser/web_resource/notification_promo.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
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 "chrome/browser/web_resource/notification_promo.h" 5 #include "chrome/browser/web_resource/notification_promo.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <vector> 8 #include <vector>
9 9
10 #include "apps/pref_names.h" 10 #include "apps/pref_names.h"
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 group_ = base::RandInt(0, num_groups_ - 1); 309 group_ = base::RandInt(0, num_groups_ - 1);
310 WritePrefs(); 310 WritePrefs();
311 } 311 }
312 312
313 // static 313 // static
314 void NotificationPromo::RegisterPrefs(PrefRegistrySimple* registry) { 314 void NotificationPromo::RegisterPrefs(PrefRegistrySimple* registry) {
315 registry->RegisterDictionaryPref(kPrefPromoObject); 315 registry->RegisterDictionaryPref(kPrefPromoObject);
316 } 316 }
317 317
318 // static 318 // static
319 void NotificationPromo::RegisterUserPrefs( 319 void NotificationPromo::RegisterProfilePrefs(
320 user_prefs::PrefRegistrySyncable* registry) { 320 user_prefs::PrefRegistrySyncable* registry) {
321 // TODO(dbeam): Registered only for migration. Remove in M28 when 321 // TODO(dbeam): Registered only for migration. Remove in M28 when
322 // we're reasonably sure all prefs are gone. 322 // we're reasonably sure all prefs are gone.
323 // http://crbug.com/168887 323 // http://crbug.com/168887
324 registry->RegisterDictionaryPref( 324 registry->RegisterDictionaryPref(
325 kPrefPromoObject, user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 325 kPrefPromoObject, user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
326 } 326 }
327 327
328 // static 328 // static
329 void NotificationPromo::MigrateUserPrefs(PrefService* user_prefs) { 329 void NotificationPromo::MigrateUserPrefs(PrefService* user_prefs) {
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 if (group_ < initial_segment_) 465 if (group_ < initial_segment_)
466 return start_; 466 return start_;
467 return start_ + 467 return start_ +
468 std::ceil(static_cast<float>(group_ - initial_segment_ + 1) / increment_) 468 std::ceil(static_cast<float>(group_ - initial_segment_ + 1) / increment_)
469 * time_slice_; 469 * time_slice_;
470 } 470 }
471 471
472 double NotificationPromo::EndTime() const { 472 double NotificationPromo::EndTime() const {
473 return end_; 473 return end_;
474 } 474 }
OLDNEW
« no previous file with comments | « chrome/browser/web_resource/notification_promo.h ('k') | chrome/browser/web_resource/promo_resource_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698