OLD | NEW |
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 "components/web_resource/notification_promo.h" | 5 #include "components/web_resource/notification_promo.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include <cmath> | 9 #include <cmath> |
8 #include <vector> | 10 #include <vector> |
9 | 11 |
10 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/macros.h" |
11 #include "base/prefs/pref_registry_simple.h" | 14 #include "base/prefs/pref_registry_simple.h" |
12 #include "base/prefs/pref_service.h" | 15 #include "base/prefs/pref_service.h" |
13 #include "base/rand_util.h" | 16 #include "base/rand_util.h" |
14 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
15 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
16 #include "base/sys_info.h" | 19 #include "base/sys_info.h" |
17 #include "base/threading/thread_restrictions.h" | 20 #include "base/threading/thread_restrictions.h" |
18 #include "base/time/time.h" | 21 #include "base/time/time.h" |
19 #include "base/values.h" | 22 #include "base/values.h" |
| 23 #include "build/build_config.h" |
20 #include "components/pref_registry/pref_registry_syncable.h" | 24 #include "components/pref_registry/pref_registry_syncable.h" |
21 #include "components/version_info/version_info.h" | 25 #include "components/version_info/version_info.h" |
22 #include "components/web_resource/promo_resource_service.h" | 26 #include "components/web_resource/promo_resource_service.h" |
23 #include "net/base/url_util.h" | 27 #include "net/base/url_util.h" |
24 #include "ui/base/device_form_factor.h" | 28 #include "ui/base/device_form_factor.h" |
25 #include "url/gurl.h" | 29 #include "url/gurl.h" |
26 | 30 |
27 namespace web_resource { | 31 namespace web_resource { |
28 | 32 |
29 namespace { | 33 namespace { |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 std::ceil(static_cast<float>(group_ - initial_segment_ + 1) / | 467 std::ceil(static_cast<float>(group_ - initial_segment_ + 1) / |
464 increment_) * | 468 increment_) * |
465 time_slice_; | 469 time_slice_; |
466 } | 470 } |
467 | 471 |
468 double NotificationPromo::EndTime() const { | 472 double NotificationPromo::EndTime() const { |
469 return end_; | 473 return end_; |
470 } | 474 } |
471 | 475 |
472 } // namespace web_resource | 476 } // namespace web_resource |
OLD | NEW |