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 #ifndef CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SERVICE_H_ |
6 #define CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SERVICE_H_ | 6 #define CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SERVICE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "base/metrics/field_trial.h" | 14 #include "base/metrics/field_trial.h" |
15 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
17 #include "chrome/browser/metrics/variations/variations_request_scheduler.h" | 17 #include "chrome/browser/metrics/variations/variations_request_scheduler.h" |
18 #include "chrome/browser/metrics/variations/variations_seed_store.h" | 18 #include "chrome/browser/metrics/variations/variations_seed_store.h" |
19 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | |
grt (UTC plus 2)
2014/10/10 17:45:42
this could be just incident_reporting/add_incicent
Georges Khalil
2014/10/10 20:19:31
Yes, changed.
| |
19 #include "chrome/browser/web_resource/resource_request_allowed_notifier.h" | 20 #include "chrome/browser/web_resource/resource_request_allowed_notifier.h" |
20 #include "chrome/common/chrome_version_info.h" | 21 #include "chrome/common/chrome_version_info.h" |
22 #include "chrome/common/safe_browsing/csd.pb.h" | |
grt (UTC plus 2)
2014/10/10 17:45:42
remove
Georges Khalil
2014/10/10 20:19:31
Done.
| |
21 #include "components/variations/variations_seed_simulator.h" | 23 #include "components/variations/variations_seed_simulator.h" |
22 #include "net/url_request/url_fetcher_delegate.h" | 24 #include "net/url_request/url_fetcher_delegate.h" |
23 #include "url/gurl.h" | 25 #include "url/gurl.h" |
24 | 26 |
25 #if defined(OS_WIN) | 27 #if defined(OS_WIN) |
26 #include "chrome/browser/metrics/variations/variations_registry_syncer_win.h" | 28 #include "chrome/browser/metrics/variations/variations_registry_syncer_win.h" |
27 #endif | 29 #endif |
28 | 30 |
29 class PrefService; | 31 class PrefService; |
30 class PrefRegistrySimple; | 32 class PrefRegistrySimple; |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
126 PrefService* local_state, | 128 PrefService* local_state, |
127 metrics::MetricsStateManager* state_manager); | 129 metrics::MetricsStateManager* state_manager); |
128 | 130 |
129 // Set the PrefService responsible for getting policy-related preferences, | 131 // Set the PrefService responsible for getting policy-related preferences, |
130 // such as the restrict parameter. | 132 // such as the restrict parameter. |
131 void set_policy_pref_service(PrefService* service) { | 133 void set_policy_pref_service(PrefService* service) { |
132 DCHECK(service); | 134 DCHECK(service); |
133 policy_pref_service_ = service; | 135 policy_pref_service_ = service; |
134 } | 136 } |
135 | 137 |
138 // Callback used by safe_browsing to send an incident report in case the | |
139 // signature was invalid | |
140 void OnDelayedSendIncidentReport( | |
141 const safe_browsing::AddIncidentCallback& callback); | |
142 | |
136 protected: | 143 protected: |
137 // Starts the fetching process once, where |OnURLFetchComplete| is called with | 144 // Starts the fetching process once, where |OnURLFetchComplete| is called with |
138 // the response. | 145 // the response. |
139 virtual void DoActualFetch(); | 146 virtual void DoActualFetch(); |
140 | 147 |
141 // Stores the seed to prefs. Set as virtual and protected so that it can be | 148 // Stores the seed to prefs. Set as virtual and protected so that it can be |
142 // overridden by tests. | 149 // overridden by tests. |
143 virtual void StoreSeed(const std::string& seed_data, | 150 virtual void StoreSeed(const std::string& seed_data, |
144 const std::string& seed_signature, | 151 const std::string& seed_signature, |
145 const base::Time& date_fetched); | 152 const base::Time& date_fetched); |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
230 #endif | 237 #endif |
231 | 238 |
232 base::WeakPtrFactory<VariationsService> weak_ptr_factory_; | 239 base::WeakPtrFactory<VariationsService> weak_ptr_factory_; |
233 | 240 |
234 DISALLOW_COPY_AND_ASSIGN(VariationsService); | 241 DISALLOW_COPY_AND_ASSIGN(VariationsService); |
235 }; | 242 }; |
236 | 243 |
237 } // namespace chrome_variations | 244 } // namespace chrome_variations |
238 | 245 |
239 #endif // CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SERVICE_H_ | 246 #endif // CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SERVICE_H_ |
OLD | NEW |