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

Side by Side Diff: chrome/browser/extensions/chrome_extension_web_contents_observer.cc

Issue 2510803003: Pass RapporService to content/browser/ (Closed)
Patch Set: Fix more compile errors in JNI files Created 4 years 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
OLDNEW
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 "chrome/browser/extensions/chrome_extension_web_contents_observer.h" 5 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/extensions/error_console/error_console.h" 10 #include "chrome/browser/extensions/error_console/error_console.h"
11 #include "chrome/browser/extensions/extension_service.h" 11 #include "chrome/browser/extensions/extension_service.h"
12 #include "chrome/browser/extensions/window_controller.h" 12 #include "chrome/browser/extensions/window_controller.h"
13 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" 13 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h"
14 #include "chrome/common/extensions/chrome_extension_messages.h" 14 #include "chrome/common/extensions/chrome_extension_messages.h"
15 #include "chrome/common/extensions/extension_process_policy.h" 15 #include "chrome/common/extensions/extension_process_policy.h"
16 #include "chrome/common/url_constants.h" 16 #include "chrome/common/url_constants.h"
17 #include "components/rappor/rappor_service.h" 17 #include "components/rappor/rappor_service_impl.h"
18 #include "content/public/browser/browser_context.h" 18 #include "content/public/browser/browser_context.h"
19 #include "content/public/browser/child_process_security_policy.h" 19 #include "content/public/browser/child_process_security_policy.h"
20 #include "content/public/browser/render_frame_host.h" 20 #include "content/public/browser/render_frame_host.h"
21 #include "content/public/browser/render_process_host.h" 21 #include "content/public/browser/render_process_host.h"
22 #include "content/public/browser/render_view_host.h" 22 #include "content/public/browser/render_view_host.h"
23 #include "content/public/common/content_switches.h" 23 #include "content/public/common/content_switches.h"
24 #include "extensions/browser/extension_registry.h" 24 #include "extensions/browser/extension_registry.h"
25 #include "extensions/browser/extension_system.h" 25 #include "extensions/browser/extension_system.h"
26 #include "extensions/common/constants.h" 26 #include "extensions/common/constants.h"
27 #include "extensions/common/extension_messages.h" 27 #include "extensions/common/extension_messages.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 // disabled. 212 // disabled.
213 ChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial( 213 ChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial(
214 "SiteIsolationExtensionsActive", "Control"); 214 "SiteIsolationExtensionsActive", "Control");
215 } else { 215 } else {
216 // The field trial is not active for this version. 216 // The field trial is not active for this version.
217 ChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial( 217 ChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial(
218 "SiteIsolationExtensionsActive", "Default"); 218 "SiteIsolationExtensionsActive", "Default");
219 } 219 }
220 } 220 }
221 221
222 if (rappor::RapporService* rappor = g_browser_process->rappor_service()) { 222 if (rappor::RapporServiceImpl* rappor =
223 g_browser_process->rappor_service()) {
223 const std::string& extension_id = 224 const std::string& extension_id =
224 parent_is_extension ? parent_url.host() : frame_url.host(); 225 parent_is_extension ? parent_url.host() : frame_url.host();
225 rappor->RecordSample("Extensions.AffectedByIsolateExtensions", 226 rappor->RecordSampleString("Extensions.AffectedByIsolateExtensions",
226 rappor::UMA_RAPPOR_TYPE, extension_id); 227 rappor::UMA_RAPPOR_TYPE, extension_id);
227 } 228 }
228 } 229 }
229 } 230 }
230 231
231 } // namespace extensions 232 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698