| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/suggestions/suggestions_service.h" | 5 #include "components/suggestions/suggestions_service.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram_macros.h" |
| 12 #include "base/metrics/sparse_histogram.h" | 12 #include "base/metrics/sparse_histogram.h" |
| 13 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.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/thread_task_runner_handle.h" | 16 #include "base/thread_task_runner_handle.h" |
| 17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
| 18 #include "components/pref_registry/pref_registry_syncable.h" | 18 #include "components/pref_registry/pref_registry_syncable.h" |
| 19 #include "components/suggestions/blacklist_store.h" | 19 #include "components/suggestions/blacklist_store.h" |
| 20 #include "components/suggestions/suggestions_store.h" | 20 #include "components/suggestions/suggestions_store.h" |
| 21 #include "components/variations/net/variations_http_header_provider.h" | 21 #include "components/variations/net/variations_http_header_provider.h" |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 scheduling_delay_ = TimeDelta::FromSeconds(kDefaultSchedulingDelaySec); | 360 scheduling_delay_ = TimeDelta::FromSeconds(kDefaultSchedulingDelaySec); |
| 361 } else { | 361 } else { |
| 362 TimeDelta candidate_delay = | 362 TimeDelta candidate_delay = |
| 363 scheduling_delay_ * kSchedulingBackoffMultiplier; | 363 scheduling_delay_ * kSchedulingBackoffMultiplier; |
| 364 if (candidate_delay < TimeDelta::FromSeconds(kSchedulingMaxDelaySec)) | 364 if (candidate_delay < TimeDelta::FromSeconds(kSchedulingMaxDelaySec)) |
| 365 scheduling_delay_ = candidate_delay; | 365 scheduling_delay_ = candidate_delay; |
| 366 } | 366 } |
| 367 } | 367 } |
| 368 | 368 |
| 369 } // namespace suggestions | 369 } // namespace suggestions |
| OLD | NEW |