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

Side by Side Diff: chrome/renderer/chrome_render_thread_observer.cc

Issue 2453313004: Convert FieldTrialActivated to use mojo. (Closed)
Patch Set: Convert FieldTrialActivated to use mojo. Created 4 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
« no previous file with comments | « chrome/renderer/chrome_render_thread_observer.h ('k') | chrome/utility/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/renderer/chrome_render_thread_observer.h" 5 #include "chrome/renderer/chrome_render_thread_observer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <limits> 9 #include <limits>
10 #include <memory> 10 #include <memory>
(...skipping 28 matching lines...) Expand all
39 #include "chrome/renderer/security_filter_peer.h" 39 #include "chrome/renderer/security_filter_peer.h"
40 #include "components/visitedlink/renderer/visitedlink_slave.h" 40 #include "components/visitedlink/renderer/visitedlink_slave.h"
41 #include "content/public/child/resource_dispatcher_delegate.h" 41 #include "content/public/child/resource_dispatcher_delegate.h"
42 #include "content/public/renderer/render_thread.h" 42 #include "content/public/renderer/render_thread.h"
43 #include "content/public/renderer/render_view.h" 43 #include "content/public/renderer/render_view.h"
44 #include "content/public/renderer/render_view_visitor.h" 44 #include "content/public/renderer/render_view_visitor.h"
45 #include "media/base/media_resources.h" 45 #include "media/base/media_resources.h"
46 #include "mojo/public/cpp/bindings/strong_binding.h" 46 #include "mojo/public/cpp/bindings/strong_binding.h"
47 #include "net/base/net_errors.h" 47 #include "net/base/net_errors.h"
48 #include "net/base/net_module.h" 48 #include "net/base/net_module.h"
49 #include "services/service_manager/public/cpp/interface_provider.h"
49 #include "services/service_manager/public/cpp/interface_registry.h" 50 #include "services/service_manager/public/cpp/interface_registry.h"
50 #include "third_party/WebKit/public/web/WebCache.h" 51 #include "third_party/WebKit/public/web/WebCache.h"
51 #include "third_party/WebKit/public/web/WebDocument.h" 52 #include "third_party/WebKit/public/web/WebDocument.h"
52 #include "third_party/WebKit/public/web/WebFrame.h" 53 #include "third_party/WebKit/public/web/WebFrame.h"
53 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" 54 #include "third_party/WebKit/public/web/WebSecurityPolicy.h"
54 #include "third_party/WebKit/public/web/WebView.h" 55 #include "third_party/WebKit/public/web/WebView.h"
55 56
56 #if defined(ENABLE_EXTENSIONS) 57 #if defined(ENABLE_EXTENSIONS)
57 #include "chrome/renderer/extensions/extension_localization_peer.h" 58 #include "chrome/renderer/extensions/extension_localization_peer.h"
58 #endif 59 #endif
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 return handled; 286 return handled;
286 } 287 }
287 288
288 void ChromeRenderThreadObserver::OnRenderProcessShutdown() { 289 void ChromeRenderThreadObserver::OnRenderProcessShutdown() {
289 visited_link_slave_.reset(); 290 visited_link_slave_.reset();
290 } 291 }
291 292
292 void ChromeRenderThreadObserver::OnFieldTrialGroupFinalized( 293 void ChromeRenderThreadObserver::OnFieldTrialGroupFinalized(
293 const std::string& trial_name, 294 const std::string& trial_name,
294 const std::string& group_name) { 295 const std::string& group_name) {
295 content::RenderThread::Get()->Send( 296 if (!field_trial_recorder_)
Sam McNally 2016/11/07 06:56:54 OnFieldTrialGroupFinalized seems like it should on
nigeltao1 2016/11/10 06:23:04 I made it a local.
296 new ChromeViewHostMsg_FieldTrialActivated(trial_name)); 297 content::RenderThread::Get()->GetRemoteInterfaces()->GetInterface(
298 &field_trial_recorder_);
299 field_trial_recorder_->FieldTrialActivated(trial_name);
297 } 300 }
298 301
299 void ChromeRenderThreadObserver::OnSetIsIncognitoProcess( 302 void ChromeRenderThreadObserver::OnSetIsIncognitoProcess(
300 bool is_incognito_process) { 303 bool is_incognito_process) {
301 is_incognito_process_ = is_incognito_process; 304 is_incognito_process_ = is_incognito_process;
302 } 305 }
303 306
304 void ChromeRenderThreadObserver::OnSetContentSettingRules( 307 void ChromeRenderThreadObserver::OnSetContentSettingRules(
305 const RendererContentSettingRules& rules) { 308 const RendererContentSettingRules& rules) {
306 content_setting_rules_ = rules; 309 content_setting_rules_ = rules;
307 } 310 }
308 311
309 void ChromeRenderThreadObserver::OnSetFieldTrialGroup( 312 void ChromeRenderThreadObserver::OnSetFieldTrialGroup(
310 const std::string& trial_name, 313 const std::string& trial_name,
311 const std::string& group_name) { 314 const std::string& group_name) {
312 field_trial_syncer_.OnSetFieldTrialGroup(trial_name, group_name); 315 field_trial_syncer_.OnSetFieldTrialGroup(trial_name, group_name);
313 } 316 }
314 317
315 const RendererContentSettingRules* 318 const RendererContentSettingRules*
316 ChromeRenderThreadObserver::content_setting_rules() const { 319 ChromeRenderThreadObserver::content_setting_rules() const {
317 return &content_setting_rules_; 320 return &content_setting_rules_;
318 } 321 }
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_render_thread_observer.h ('k') | chrome/utility/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698