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

Side by Side Diff: chrome/browser/web_resource/notification_promo.cc

Issue 1102733002: Remove most occurences of PrefRegistrySyncable::UNSYNCABLE_PREF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs-add-reg-funcs
Patch Set: Created 5 years, 8 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 (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 "base/bind.h" 10 #include "base/bind.h"
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 void NotificationPromo::RegisterPrefs(PrefRegistrySimple* registry) { 319 void NotificationPromo::RegisterPrefs(PrefRegistrySimple* registry) {
320 registry->RegisterDictionaryPref(kPrefPromoObject); 320 registry->RegisterDictionaryPref(kPrefPromoObject);
321 } 321 }
322 322
323 // static 323 // static
324 void NotificationPromo::RegisterProfilePrefs( 324 void NotificationPromo::RegisterProfilePrefs(
325 user_prefs::PrefRegistrySyncable* registry) { 325 user_prefs::PrefRegistrySyncable* registry) {
326 // TODO(dbeam): Registered only for migration. Remove in M28 when 326 // TODO(dbeam): Registered only for migration. Remove in M28 when
327 // we're reasonably sure all prefs are gone. 327 // we're reasonably sure all prefs are gone.
328 // http://crbug.com/168887 328 // http://crbug.com/168887
329 registry->RegisterDictionaryPref( 329 registry->RegisterDictionaryPref(kPrefPromoObject);
330 kPrefPromoObject, user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
331 } 330 }
332 331
333 // static 332 // static
334 void NotificationPromo::MigrateUserPrefs(PrefService* user_prefs) { 333 void NotificationPromo::MigrateUserPrefs(PrefService* user_prefs) {
335 user_prefs->ClearPref(kPrefPromoObject); 334 user_prefs->ClearPref(kPrefPromoObject);
336 } 335 }
337 336
338 void NotificationPromo::WritePrefs() { 337 void NotificationPromo::WritePrefs() {
339 base::DictionaryValue* ntp_promo = new base::DictionaryValue; 338 base::DictionaryValue* ntp_promo = new base::DictionaryValue;
340 ntp_promo->SetString(kPrefPromoText, promo_text_); 339 ntp_promo->SetString(kPrefPromoText, promo_text_);
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 if (group_ < initial_segment_) 481 if (group_ < initial_segment_)
483 return start_; 482 return start_;
484 return start_ + 483 return start_ +
485 std::ceil(static_cast<float>(group_ - initial_segment_ + 1) / increment_) 484 std::ceil(static_cast<float>(group_ - initial_segment_ + 1) / increment_)
486 * time_slice_; 485 * time_slice_;
487 } 486 }
488 487
489 double NotificationPromo::EndTime() const { 488 double NotificationPromo::EndTime() const {
490 return end_; 489 return end_;
491 } 490 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/print_preview/sticky_settings.cc ('k') | chrome/browser/web_resource/promo_resource_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698