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

Side by Side Diff: chrome/browser/chromeos/external_metrics.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 #include "chrome/browser/chromeos/external_metrics.h" 5 #include "chrome/browser/chromeos/external_metrics.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <string.h> 10 #include <string.h>
11 #include <sys/file.h> 11 #include <sys/file.h>
12 #include <sys/stat.h> 12 #include <sys/stat.h>
13 #include <sys/types.h> 13 #include <sys/types.h>
14 #include <unistd.h> 14 #include <unistd.h>
15 15
16 #include "base/basictypes.h" 16 #include "base/basictypes.h"
17 #include "base/eintr_wrapper.h" 17 #include "base/eintr_wrapper.h"
18 #include "base/metrics/histogram.h" 18 #include "base/metrics/histogram.h"
19 #include "base/perftimer.h" 19 #include "base/perftimer.h"
20 #include "base/time.h" 20 #include "base/time.h"
21 #include "chrome/browser/browser_process.h" 21 #include "chrome/browser/browser_process.h"
22 #include "chrome/browser/metrics/metrics_service.h" 22 #include "chrome/browser/metrics/metrics_service.h"
23 #include "content/browser/user_metrics.h" 23 #include "content/browser/user_metrics.h"
24 #include "content/public/browser/browser_thread.h" 24 #include "content/public/browser/browser_thread.h"
25 25
26 using content::BrowserThread;
27
26 namespace chromeos { 28 namespace chromeos {
27 29
28 // The interval between external metrics collections, in milliseconds. 30 // The interval between external metrics collections, in milliseconds.
29 static const int kExternalMetricsCollectionIntervalMs = 30 * 1000; 31 static const int kExternalMetricsCollectionIntervalMs = 30 * 1000;
30 32
31 ExternalMetrics::ExternalMetrics() 33 ExternalMetrics::ExternalMetrics()
32 : test_recorder_(NULL) { 34 : test_recorder_(NULL) {
33 } 35 }
34 36
35 ExternalMetrics::~ExternalMetrics() {} 37 ExternalMetrics::~ExternalMetrics() {}
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 void ExternalMetrics::ScheduleCollector() { 234 void ExternalMetrics::ScheduleCollector() {
233 bool result; 235 bool result;
234 result = BrowserThread::PostDelayedTask( 236 result = BrowserThread::PostDelayedTask(
235 BrowserThread::FILE, FROM_HERE, NewRunnableMethod( 237 BrowserThread::FILE, FROM_HERE, NewRunnableMethod(
236 this, &chromeos::ExternalMetrics::CollectEventsAndReschedule), 238 this, &chromeos::ExternalMetrics::CollectEventsAndReschedule),
237 kExternalMetricsCollectionIntervalMs); 239 kExternalMetricsCollectionIntervalMs);
238 DCHECK(result); 240 DCHECK(result);
239 } 241 }
240 242
241 } // namespace chromeos 243 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698