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

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

Issue 131089: When we upgrade, discard all uploadable stats, including old logs... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 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
« no previous file with comments | « no previous file | no next file » | 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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 5
6 6
7 //------------------------------------------------------------------------------ 7 //------------------------------------------------------------------------------
8 // Description of the life cycle of a instance of MetricsService. 8 // Description of the life cycle of a instance of MetricsService.
9 // 9 //
10 // OVERVIEW 10 // OVERVIEW
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 local_state->SetInteger(prefs::kStabilityPageLoadCount, 0); 365 local_state->SetInteger(prefs::kStabilityPageLoadCount, 0);
366 local_state->SetInteger(prefs::kStabilityRendererCrashCount, 0); 366 local_state->SetInteger(prefs::kStabilityRendererCrashCount, 0);
367 local_state->SetInteger(prefs::kStabilityRendererHangCount, 0); 367 local_state->SetInteger(prefs::kStabilityRendererHangCount, 0);
368 368
369 local_state->SetInteger(prefs::kSecurityRendererOnSboxDesktop, 0); 369 local_state->SetInteger(prefs::kSecurityRendererOnSboxDesktop, 0);
370 local_state->SetInteger(prefs::kSecurityRendererOnDefaultDesktop, 0); 370 local_state->SetInteger(prefs::kSecurityRendererOnDefaultDesktop, 0);
371 371
372 local_state->SetString(prefs::kStabilityUptimeSec, L"0"); 372 local_state->SetString(prefs::kStabilityUptimeSec, L"0");
373 373
374 local_state->ClearPref(prefs::kStabilityPluginStats); 374 local_state->ClearPref(prefs::kStabilityPluginStats);
375
376 ListValue* unsent_initial_logs = local_state->GetMutableList(
377 prefs::kMetricsInitialLogs);
378 unsent_initial_logs->Clear();
379
380 ListValue* unsent_ongoing_logs = local_state->GetMutableList(
381 prefs::kMetricsOngoingLogs);
Evan Martin 2009/06/19 05:14:22 Can these ever be NULL? Just want you to be sure.
jar (doing other things) 2009/06/19 06:07:22 It is guaranteed to be non-NULL so long as the pre
382 unsent_ongoing_logs->Clear();
375 } 383 }
376 384
377 MetricsService::MetricsService() 385 MetricsService::MetricsService()
378 : recording_active_(false), 386 : recording_active_(false),
379 reporting_active_(false), 387 reporting_active_(false),
380 user_permits_upload_(false), 388 user_permits_upload_(false),
381 server_permits_upload_(true), 389 server_permits_upload_(true),
382 state_(INITIALIZED), 390 state_(INITIALIZED),
383 pending_log_(NULL), 391 pending_log_(NULL),
384 pending_log_text_(""), 392 pending_log_text_(""),
(...skipping 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after
1897 L"." + key; 1905 L"." + key;
1898 prof_prefs->SetInteger(pref_key.c_str(), value); 1906 prof_prefs->SetInteger(pref_key.c_str(), value);
1899 } 1907 }
1900 1908
1901 static bool IsSingleThreaded() { 1909 static bool IsSingleThreaded() {
1902 static PlatformThreadId thread_id = 0; 1910 static PlatformThreadId thread_id = 0;
1903 if (!thread_id) 1911 if (!thread_id)
1904 thread_id = PlatformThread::CurrentId(); 1912 thread_id = PlatformThread::CurrentId();
1905 return PlatformThread::CurrentId() == thread_id; 1913 return PlatformThread::CurrentId() == thread_id;
1906 } 1914 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698