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

Side by Side Diff: chrome/browser/metrics/variations/variations_service.cc

Issue 271793003: components: Extract pref_registry component out of user_prefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nits 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/metrics/variations/variations_service.h" 5 #include "chrome/browser/metrics/variations/variations_service.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/build_time.h" 9 #include "base/build_time.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "base/metrics/sparse_histogram.h" 12 #include "base/metrics/sparse_histogram.h"
13 #include "base/prefs/pref_registry_simple.h" 13 #include "base/prefs/pref_registry_simple.h"
14 #include "base/prefs/pref_service.h" 14 #include "base/prefs/pref_service.h"
15 #include "base/sys_info.h" 15 #include "base/sys_info.h"
16 #include "base/version.h" 16 #include "base/version.h"
17 #include "chrome/browser/browser_process.h" 17 #include "chrome/browser/browser_process.h"
18 #include "chrome/browser/network_time/network_time_tracker.h" 18 #include "chrome/browser/network_time/network_time_tracker.h"
19 #include "chrome/common/chrome_switches.h" 19 #include "chrome/common/chrome_switches.h"
20 #include "chrome/common/pref_names.h" 20 #include "chrome/common/pref_names.h"
21 #include "components/user_prefs/pref_registry_syncable.h" 21 #include "components/pref_registry/pref_registry_syncable.h"
22 #include "components/variations/proto/variations_seed.pb.h" 22 #include "components/variations/proto/variations_seed.pb.h"
23 #include "components/variations/variations_seed_processor.h" 23 #include "components/variations/variations_seed_processor.h"
24 #include "content/public/browser/browser_thread.h" 24 #include "content/public/browser/browser_thread.h"
25 #include "net/base/load_flags.h" 25 #include "net/base/load_flags.h"
26 #include "net/base/net_errors.h" 26 #include "net/base/net_errors.h"
27 #include "net/base/network_change_notifier.h" 27 #include "net/base/network_change_notifier.h"
28 #include "net/base/url_util.h" 28 #include "net/base/url_util.h"
29 #include "net/http/http_response_headers.h" 29 #include "net/http/http_response_headers.h"
30 #include "net/http/http_status_code.h" 30 #include "net/http/http_status_code.h"
31 #include "net/http/http_util.h" 31 #include "net/http/http_util.h"
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 496
497 void VariationsService::RecordLastFetchTime() { 497 void VariationsService::RecordLastFetchTime() {
498 // local_state_ is NULL in tests, so check it first. 498 // local_state_ is NULL in tests, so check it first.
499 if (local_state_) { 499 if (local_state_) {
500 local_state_->SetInt64(prefs::kVariationsLastFetchTime, 500 local_state_->SetInt64(prefs::kVariationsLastFetchTime,
501 base::Time::Now().ToInternalValue()); 501 base::Time::Now().ToInternalValue());
502 } 502 }
503 } 503 }
504 504
505 } // namespace chrome_variations 505 } // namespace chrome_variations
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698