| OLD | NEW |
| 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/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 <string> | 16 #include <string> |
| 17 | 17 |
| 18 #include "base/basictypes.h" | 18 #include "base/basictypes.h" |
| 19 #include "base/bind.h" | 19 #include "base/bind.h" |
| 20 #include "base/eintr_wrapper.h" | |
| 21 #include "base/metrics/histogram.h" | 20 #include "base/metrics/histogram.h" |
| 22 #include "base/metrics/statistics_recorder.h" | 21 #include "base/metrics/statistics_recorder.h" |
| 23 #include "base/perftimer.h" | 22 #include "base/perftimer.h" |
| 23 #include "base/posix/eintr_wrapper.h" |
| 24 #include "base/time.h" | 24 #include "base/time.h" |
| 25 #include "chrome/browser/browser_process.h" | 25 #include "chrome/browser/browser_process.h" |
| 26 #include "chrome/browser/metrics/metrics_service.h" | 26 #include "chrome/browser/metrics/metrics_service.h" |
| 27 #include "content/public/browser/browser_thread.h" | 27 #include "content/public/browser/browser_thread.h" |
| 28 #include "content/public/browser/user_metrics.h" | 28 #include "content/public/browser/user_metrics.h" |
| 29 | 29 |
| 30 using content::BrowserThread; | 30 using content::BrowserThread; |
| 31 using content::UserMetricsAction; | 31 using content::UserMetricsAction; |
| 32 | 32 |
| 33 namespace chromeos { | 33 namespace chromeos { |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 void ExternalMetrics::ScheduleCollector() { | 269 void ExternalMetrics::ScheduleCollector() { |
| 270 bool result; | 270 bool result; |
| 271 result = BrowserThread::PostDelayedTask( | 271 result = BrowserThread::PostDelayedTask( |
| 272 BrowserThread::FILE, FROM_HERE, | 272 BrowserThread::FILE, FROM_HERE, |
| 273 base::Bind(&chromeos::ExternalMetrics::CollectEventsAndReschedule, this), | 273 base::Bind(&chromeos::ExternalMetrics::CollectEventsAndReschedule, this), |
| 274 base::TimeDelta::FromSeconds(kExternalMetricsCollectionIntervalSeconds)); | 274 base::TimeDelta::FromSeconds(kExternalMetricsCollectionIntervalSeconds)); |
| 275 DCHECK(result); | 275 DCHECK(result); |
| 276 } | 276 } |
| 277 | 277 |
| 278 } // namespace chromeos | 278 } // namespace chromeos |
| OLD | NEW |