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

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

Issue 149643010: Cleanup: Move kChromeUIScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/net/url_fixer_upper.cc ('k') | chrome/renderer/content_settings_observer.cc » ('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_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/crash_logging.h" 8 #include "base/debug/crash_logging.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 290
291 // TODO(guohui): needs to forward the new-profile-management switch to 291 // TODO(guohui): needs to forward the new-profile-management switch to
292 // renderer processes. 292 // renderer processes.
293 if (switches::IsNewProfileManagement()) 293 if (switches::IsNewProfileManagement())
294 thread->RegisterExtension(extensions_v8::PrincipalsExtension::Get()); 294 thread->RegisterExtension(extensions_v8::PrincipalsExtension::Get());
295 295
296 // chrome:, chrome-search:, chrome-devtools:, and chrome-distiller: pages 296 // chrome:, chrome-search:, chrome-devtools:, and chrome-distiller: pages
297 // should not be accessible by normal content, and should also be unable to 297 // should not be accessible by normal content, and should also be unable to
298 // script anything but themselves (to help limit the damage that a corrupt 298 // script anything but themselves (to help limit the damage that a corrupt
299 // page could cause). 299 // page could cause).
300 WebString chrome_ui_scheme(ASCIIToUTF16(chrome::kChromeUIScheme)); 300 WebString chrome_ui_scheme(ASCIIToUTF16(content::kChromeUIScheme));
301 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_ui_scheme); 301 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_ui_scheme);
302 302
303 WebString chrome_search_scheme(ASCIIToUTF16(chrome::kChromeSearchScheme)); 303 WebString chrome_search_scheme(ASCIIToUTF16(chrome::kChromeSearchScheme));
304 // The Instant process can only display the content but not read it. Other 304 // The Instant process can only display the content but not read it. Other
305 // processes can't display it or read it. 305 // processes can't display it or read it.
306 if (!command_line->HasSwitch(switches::kInstantProcess)) 306 if (!command_line->HasSwitch(switches::kInstantProcess))
307 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_search_scheme); 307 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_search_scheme);
308 308
309 WebString dev_tools_scheme(ASCIIToUTF16(chrome::kChromeDevToolsScheme)); 309 WebString dev_tools_scheme(ASCIIToUTF16(chrome::kChromeDevToolsScheme));
310 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(dev_tools_scheme); 310 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(dev_tools_scheme);
(...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1417 CommandLine* command_line = CommandLine::ForCurrentProcess(); 1417 CommandLine* command_line = CommandLine::ForCurrentProcess();
1418 return !command_line->HasSwitch(extensions::switches::kExtensionProcess); 1418 return !command_line->HasSwitch(extensions::switches::kExtensionProcess);
1419 } 1419 }
1420 1420
1421 blink::WebWorkerPermissionClientProxy* 1421 blink::WebWorkerPermissionClientProxy*
1422 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( 1422 ChromeContentRendererClient::CreateWorkerPermissionClientProxy(
1423 content::RenderFrame* render_frame, 1423 content::RenderFrame* render_frame,
1424 blink::WebFrame* frame) { 1424 blink::WebFrame* frame) {
1425 return new WorkerPermissionClientProxy(render_frame, frame); 1425 return new WorkerPermissionClientProxy(render_frame, frame);
1426 } 1426 }
OLDNEW
« no previous file with comments | « chrome/common/net/url_fixer_upper.cc ('k') | chrome/renderer/content_settings_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698