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

Side by Side Diff: chrome/browser/metrics/metrics_log.cc

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 8 years 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
« no previous file with comments | « chrome/browser/metrics/metrics_log.h ('k') | chrome/browser/metrics/metrics_log_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/metrics_log.h" 5 #include "chrome/browser/metrics/metrics_log.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 271
272 static base::LazyInstance<std::string>::Leaky 272 static base::LazyInstance<std::string>::Leaky
273 g_version_extension = LAZY_INSTANCE_INITIALIZER; 273 g_version_extension = LAZY_INSTANCE_INITIALIZER;
274 274
275 MetricsLog::MetricsLog(const std::string& client_id, int session_id) 275 MetricsLog::MetricsLog(const std::string& client_id, int session_id)
276 : MetricsLogBase(client_id, session_id, MetricsLog::GetVersionString()) {} 276 : MetricsLogBase(client_id, session_id, MetricsLog::GetVersionString()) {}
277 277
278 MetricsLog::~MetricsLog() {} 278 MetricsLog::~MetricsLog() {}
279 279
280 // static 280 // static
281 void MetricsLog::RegisterPrefs(PrefService* local_state) { 281 void MetricsLog::RegisterPrefs(PrefServiceSimple* local_state) {
282 local_state->RegisterListPref(prefs::kStabilityPluginStats); 282 local_state->RegisterListPref(prefs::kStabilityPluginStats);
283 } 283 }
284 284
285 // static 285 // static
286 int64 MetricsLog::GetIncrementalUptime(PrefService* pref) { 286 int64 MetricsLog::GetIncrementalUptime(PrefService* pref) {
287 base::TimeTicks now = base::TimeTicks::Now(); 287 base::TimeTicks now = base::TimeTicks::Now();
288 static base::TimeTicks last_updated_time(now); 288 static base::TimeTicks last_updated_time(now);
289 int64 incremental_time = (now - last_updated_time).InSeconds(); 289 int64 incremental_time = (now - last_updated_time).InSeconds();
290 last_updated_time = now; 290 last_updated_time = now;
291 291
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 ProductDataToProto(google_update_metrics.google_update_data, 1029 ProductDataToProto(google_update_metrics.google_update_data,
1030 google_update->mutable_google_update_status()); 1030 google_update->mutable_google_update_status());
1031 } 1031 }
1032 1032
1033 if (!google_update_metrics.product_data.version.empty()) { 1033 if (!google_update_metrics.product_data.version.empty()) {
1034 ProductDataToProto(google_update_metrics.product_data, 1034 ProductDataToProto(google_update_metrics.product_data,
1035 google_update->mutable_client_status()); 1035 google_update->mutable_client_status());
1036 } 1036 }
1037 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN) 1037 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN)
1038 } 1038 }
OLDNEW
« no previous file with comments | « chrome/browser/metrics/metrics_log.h ('k') | chrome/browser/metrics/metrics_log_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698