| OLD | NEW | 
|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/browser/service_worker/service_worker_metrics.h" | 5 #include "content/browser/service_worker/service_worker_metrics.h" | 
| 6 | 6 | 
| 7 #include <limits> | 7 #include <limits> | 
| 8 #include <string> | 8 #include <string> | 
| 9 | 9 | 
| 10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" | 
| 11 #include "base/metrics/sparse_histogram.h" | 11 #include "base/metrics/sparse_histogram.h" | 
| 12 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" | 
| 13 #include "base/time/time.h" | 13 #include "base/time/time.h" | 
| 14 #include "content/browser/service_worker/embedded_worker_status.h" | 14 #include "content/browser/service_worker/embedded_worker_status.h" | 
| 15 #include "content/common/service_worker/service_worker_types.h" |  | 
| 16 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" | 
| 17 #include "content/public/browser/content_browser_client.h" | 16 #include "content/public/browser/content_browser_client.h" | 
| 18 #include "content/public/common/content_client.h" | 17 #include "content/public/common/content_client.h" | 
| 19 | 18 | 
| 20 namespace content { | 19 namespace content { | 
| 21 | 20 | 
| 22 namespace { | 21 namespace { | 
| 23 | 22 | 
| 24 std::string StartSituationToSuffix( | 23 std::string StartSituationToSuffix( | 
| 25     ServiceWorkerMetrics::StartSituation situation) { | 24     ServiceWorkerMetrics::StartSituation situation) { | 
| (...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1004 void ServiceWorkerMetrics::RecordUninstalledScriptImport(const GURL& url) { | 1003 void ServiceWorkerMetrics::RecordUninstalledScriptImport(const GURL& url) { | 
| 1005   BrowserThread::PostTask( | 1004   BrowserThread::PostTask( | 
| 1006       BrowserThread::UI, FROM_HERE, | 1005       BrowserThread::UI, FROM_HERE, | 
| 1007       base::Bind(&RecordURLMetricOnUI, | 1006       base::Bind(&RecordURLMetricOnUI, | 
| 1008                  "ServiceWorker.ContextRequestHandlerStatus." | 1007                  "ServiceWorker.ContextRequestHandlerStatus." | 
| 1009                  "UninstalledScriptImport", | 1008                  "UninstalledScriptImport", | 
| 1010                  url)); | 1009                  url)); | 
| 1011 } | 1010 } | 
| 1012 | 1011 | 
| 1013 }  // namespace content | 1012 }  // namespace content | 
| OLD | NEW | 
|---|