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

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

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Description of the life cycle of a instance of MetricsService. 6 // Description of the life cycle of a instance of MetricsService.
7 // 7 //
8 // OVERVIEW 8 // OVERVIEW
9 // 9 //
10 // A MetricsService instance is typically created at application startup. It 10 // A MetricsService instance is typically created at application startup. It
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 #include "chrome/installer/util/browser_distribution.h" 189 #include "chrome/installer/util/browser_distribution.h"
190 #endif 190 #endif
191 191
192 #if defined(OS_CHROMEOS) 192 #if defined(OS_CHROMEOS)
193 #include "chrome/browser/chromeos/cros/cros_library.h" 193 #include "chrome/browser/chromeos/cros/cros_library.h"
194 #include "chrome/browser/chromeos/external_metrics.h" 194 #include "chrome/browser/chromeos/external_metrics.h"
195 #include "chrome/browser/chromeos/system/statistics_provider.h" 195 #include "chrome/browser/chromeos/system/statistics_provider.h"
196 #endif 196 #endif
197 197
198 using base::Time; 198 using base::Time;
199 using content::BrowserThread;
199 200
200 // Check to see that we're being called on only one thread. 201 // Check to see that we're being called on only one thread.
201 static bool IsSingleThreaded(); 202 static bool IsSingleThreaded();
202 203
203 static const char kMetricsType[] = "application/vnd.mozilla.metrics.bz2"; 204 static const char kMetricsType[] = "application/vnd.mozilla.metrics.bz2";
204 205
205 // The delay, in seconds, after starting recording before doing expensive 206 // The delay, in seconds, after starting recording before doing expensive
206 // initialization work. 207 // initialization work.
207 static const int kInitializationDelaySeconds = 30; 208 static const int kInitializationDelaySeconds = 30;
208 209
(...skipping 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after
1541 if (local_state) { 1542 if (local_state) {
1542 const PrefService::Preference* uma_pref = 1543 const PrefService::Preference* uma_pref =
1543 local_state->FindPreference(prefs::kMetricsReportingEnabled); 1544 local_state->FindPreference(prefs::kMetricsReportingEnabled);
1544 if (uma_pref) { 1545 if (uma_pref) {
1545 bool success = uma_pref->GetValue()->GetAsBoolean(&result); 1546 bool success = uma_pref->GetValue()->GetAsBoolean(&result);
1546 DCHECK(success); 1547 DCHECK(success);
1547 } 1548 }
1548 } 1549 }
1549 return result; 1550 return result;
1550 } 1551 }
OLDNEW
« no previous file with comments | « chrome/browser/metrics/histogram_synchronizer.cc ('k') | chrome/browser/metrics/thread_watcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698