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

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

Issue 2514593002: Field trial synchronization to PPAPI process. (Closed)
Patch Set: Fix namespace. 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
« no previous file with comments | « chrome/renderer/chrome_render_thread_observer.h ('k') | chrome/test/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 21 matching lines...) Expand all
32 #include "chrome/common/media/media_resource_provider.h" 32 #include "chrome/common/media/media_resource_provider.h"
33 #include "chrome/common/net/net_resource_provider.h" 33 #include "chrome/common/net/net_resource_provider.h"
34 #include "chrome/common/render_messages.h" 34 #include "chrome/common/render_messages.h"
35 #include "chrome/common/resource_usage_reporter.mojom.h" 35 #include "chrome/common/resource_usage_reporter.mojom.h"
36 #include "chrome/common/resource_usage_reporter_type_converters.h" 36 #include "chrome/common/resource_usage_reporter_type_converters.h"
37 #include "chrome/common/url_constants.h" 37 #include "chrome/common/url_constants.h"
38 #include "chrome/renderer/content_settings_observer.h" 38 #include "chrome/renderer/content_settings_observer.h"
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/common/content_switches.h"
42 #include "content/public/renderer/render_thread.h" 43 #include "content/public/renderer/render_thread.h"
43 #include "content/public/renderer/render_view.h" 44 #include "content/public/renderer/render_view.h"
44 #include "content/public/renderer/render_view_visitor.h" 45 #include "content/public/renderer/render_view_visitor.h"
45 #include "extensions/features/features.h" 46 #include "extensions/features/features.h"
46 #include "media/base/media_resources.h" 47 #include "media/base/media_resources.h"
47 #include "mojo/public/cpp/bindings/strong_binding.h" 48 #include "mojo/public/cpp/bindings/strong_binding.h"
48 #include "net/base/net_errors.h" 49 #include "net/base/net_errors.h"
49 #include "net/base/net_module.h" 50 #include "net/base/net_module.h"
50 #include "services/service_manager/public/cpp/interface_registry.h" 51 #include "services/service_manager/public/cpp/interface_registry.h"
51 #include "third_party/WebKit/public/web/WebCache.h" 52 #include "third_party/WebKit/public/web/WebCache.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 thread->SetResourceDispatcherDelegate(resource_delegate_.get()); 245 thread->SetResourceDispatcherDelegate(resource_delegate_.get());
245 246
246 thread->GetInterfaceRegistry()->AddInterface( 247 thread->GetInterfaceRegistry()->AddInterface(
247 base::Bind(CreateResourceUsageReporter, weak_factory_.GetWeakPtr())); 248 base::Bind(CreateResourceUsageReporter, weak_factory_.GetWeakPtr()));
248 249
249 // Configure modules that need access to resources. 250 // Configure modules that need access to resources.
250 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); 251 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider);
251 media::SetLocalizedStringProvider( 252 media::SetLocalizedStringProvider(
252 chrome_common_media::LocalizedStringProvider); 253 chrome_common_media::LocalizedStringProvider);
253 254
254 field_trial_syncer_.InitFieldTrialObserving(command_line); 255 field_trial_syncer_.InitFieldTrialObserving(command_line,
256 switches::kSingleProcess);
255 257
256 // chrome-native: is a scheme used for placeholder navigations that allow 258 // chrome-native: is a scheme used for placeholder navigations that allow
257 // UIs to be drawn with platform native widgets instead of HTML. These pages 259 // UIs to be drawn with platform native widgets instead of HTML. These pages
258 // should not be accessible, and should also be treated as empty documents 260 // should not be accessible, and should also be treated as empty documents
259 // that can commit synchronously. No code should be runnable in these pages, 261 // that can commit synchronously. No code should be runnable in these pages,
260 // so it should not need to access anything nor should it allow javascript 262 // so it should not need to access anything nor should it allow javascript
261 // URLs since it should never be visible to the user. 263 // URLs since it should never be visible to the user.
262 WebString native_scheme(base::ASCIIToUTF16(chrome::kChromeNativeScheme)); 264 WebString native_scheme(base::ASCIIToUTF16(chrome::kChromeNativeScheme));
263 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(native_scheme); 265 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(native_scheme);
264 WebSecurityPolicy::registerURLSchemeAsEmptyDocument(native_scheme); 266 WebSecurityPolicy::registerURLSchemeAsEmptyDocument(native_scheme);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 void ChromeRenderThreadObserver::OnSetFieldTrialGroup( 312 void ChromeRenderThreadObserver::OnSetFieldTrialGroup(
311 const std::string& trial_name, 313 const std::string& trial_name,
312 const std::string& group_name) { 314 const std::string& group_name) {
313 field_trial_syncer_.OnSetFieldTrialGroup(trial_name, group_name); 315 field_trial_syncer_.OnSetFieldTrialGroup(trial_name, group_name);
314 } 316 }
315 317
316 const RendererContentSettingRules* 318 const RendererContentSettingRules*
317 ChromeRenderThreadObserver::content_setting_rules() const { 319 ChromeRenderThreadObserver::content_setting_rules() const {
318 return &content_setting_rules_; 320 return &content_setting_rules_;
319 } 321 }
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_render_thread_observer.h ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698