OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/ntp_snippets/request_throttler.h" | 5 #include "components/ntp_snippets/request_throttler.h" |
6 | 6 |
7 #include <limits.h> | 7 #include <climits> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
11 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
12 #include "base/strings/string_split.h" | 12 #include "base/strings/string_split.h" |
13 #include "base/strings/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "components/ntp_snippets/ntp_snippets_constants.h" | 15 #include "components/ntp_snippets/ntp_snippets_constants.h" |
16 #include "components/ntp_snippets/pref_names.h" | 16 #include "components/ntp_snippets/pref_names.h" |
17 #include "components/prefs/pref_registry_simple.h" | 17 #include "components/prefs/pref_registry_simple.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 | 180 |
181 void RequestThrottler::SetDay(int day) { | 181 void RequestThrottler::SetDay(int day) { |
182 pref_service_->SetInteger(type_info_.day_pref, day); | 182 pref_service_->SetInteger(type_info_.day_pref, day); |
183 } | 183 } |
184 | 184 |
185 bool RequestThrottler::HasDay() const { | 185 bool RequestThrottler::HasDay() const { |
186 return pref_service_->HasPrefPath(type_info_.day_pref); | 186 return pref_service_->HasPrefPath(type_info_.day_pref); |
187 } | 187 } |
188 | 188 |
189 } // namespace ntp_snippets | 189 } // namespace ntp_snippets |
OLD | NEW |