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

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

Issue 271793003: components: Extract pref_registry component out of user_prefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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 "base/bind.h" 10 #include "base/bind.h"
11 #include "base/prefs/pref_registry_simple.h" 11 #include "base/prefs/pref_registry_simple.h"
12 #include "base/prefs/pref_service.h" 12 #include "base/prefs/pref_service.h"
13 #include "base/rand_util.h" 13 #include "base/rand_util.h"
14 #include "base/strings/string_number_conversions.h" 14 #include "base/strings/string_number_conversions.h"
15 #include "base/strings/string_util.h" 15 #include "base/strings/string_util.h"
16 #include "base/sys_info.h" 16 #include "base/sys_info.h"
17 #include "base/threading/thread_restrictions.h" 17 #include "base/threading/thread_restrictions.h"
18 #include "base/time/time.h" 18 #include "base/time/time.h"
19 #include "base/values.h" 19 #include "base/values.h"
20 #include "chrome/browser/browser_process.h" 20 #include "chrome/browser/browser_process.h"
21 #include "chrome/browser/web_resource/promo_resource_service.h" 21 #include "chrome/browser/web_resource/promo_resource_service.h"
22 #include "chrome/common/chrome_version_info.h" 22 #include "chrome/common/chrome_version_info.h"
23 #include "chrome/common/pref_names.h" 23 #include "chrome/common/pref_names.h"
24 #include "components/user_prefs/pref_registry_syncable.h" 24 #include "components/pref_registry/pref_registry_syncable.h"
25 #include "content/public/browser/user_metrics.h" 25 #include "content/public/browser/user_metrics.h"
26 #include "net/base/url_util.h" 26 #include "net/base/url_util.h"
27 #include "ui/base/device_form_factor.h" 27 #include "ui/base/device_form_factor.h"
28 #include "url/gurl.h" 28 #include "url/gurl.h"
29 29
30 using base::UserMetricsAction; 30 using base::UserMetricsAction;
31 31
32 namespace { 32 namespace {
33 33
34 const int kDefaultGroupSize = 100; 34 const int kDefaultGroupSize = 100;
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 if (group_ < initial_segment_) 460 if (group_ < initial_segment_)
461 return start_; 461 return start_;
462 return start_ + 462 return start_ +
463 std::ceil(static_cast<float>(group_ - initial_segment_ + 1) / increment_) 463 std::ceil(static_cast<float>(group_ - initial_segment_ + 1) / increment_)
464 * time_slice_; 464 * time_slice_;
465 } 465 }
466 466
467 double NotificationPromo::EndTime() const { 467 double NotificationPromo::EndTime() const {
468 return end_; 468 return end_;
469 } 469 }
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