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

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

Issue 2455133004: Make the content scheme local (Closed)
Patch Set: 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/browser/profiles/profile_io_data.cc ('k') | no next file » | 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 <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(dom_distiller_scheme); 412 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(dom_distiller_scheme);
413 413
414 #if defined(OS_CHROMEOS) 414 #if defined(OS_CHROMEOS)
415 WebSecurityPolicy::registerURLSchemeAsLocal( 415 WebSecurityPolicy::registerURLSchemeAsLocal(
416 WebString::fromUTF8(content::kExternalFileScheme)); 416 WebString::fromUTF8(content::kExternalFileScheme));
417 #endif 417 #endif
418 418
419 #if defined(OS_ANDROID) 419 #if defined(OS_ANDROID)
420 WebSecurityPolicy::registerURLSchemeAsAllowedForReferrer( 420 WebSecurityPolicy::registerURLSchemeAsAllowedForReferrer(
421 WebString::fromUTF8(chrome::kAndroidAppScheme)); 421 WebString::fromUTF8(chrome::kAndroidAppScheme));
422 WebSecurityPolicy::registerURLSchemeAsLocal(
423 WebString::fromUTF8(url::kContentScheme));
422 #endif 424 #endif
423 425
424 // chrome-search: pages should not be accessible by bookmarklets 426 // chrome-search: pages should not be accessible by bookmarklets
425 // or javascript: URLs typed in the omnibox. 427 // or javascript: URLs typed in the omnibox.
426 WebSecurityPolicy::registerURLSchemeAsNotAllowingJavascriptURLs( 428 WebSecurityPolicy::registerURLSchemeAsNotAllowingJavascriptURLs(
427 chrome_search_scheme); 429 chrome_search_scheme);
428 430
429 // chrome-search: resources shouldn't trigger insecure content warnings. Note 431 // chrome-search: resources shouldn't trigger insecure content warnings. Note
430 // that chrome-extension: and chrome-extension-resource: schemes are taken 432 // that chrome-extension: and chrome-extension-resource: schemes are taken
431 // care of in extensions::Dispatcher. 433 // care of in extensions::Dispatcher.
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after
1475 1477
1476 url::Replacements<char> r; 1478 url::Replacements<char> r;
1477 r.SetPath(path.c_str(), url::Component(0, path.length())); 1479 r.SetPath(path.c_str(), url::Component(0, path.length()));
1478 1480
1479 if (result == internal::NUM_PLUGIN_ERROR) 1481 if (result == internal::NUM_PLUGIN_ERROR)
1480 result = invalid_url ? internal::SUCCESS_PARAMS_REWRITE : internal::SUCCESS; 1482 result = invalid_url ? internal::SUCCESS_PARAMS_REWRITE : internal::SUCCESS;
1481 1483
1482 RecordYouTubeRewriteUMA(result); 1484 RecordYouTubeRewriteUMA(result);
1483 return corrected_url.ReplaceComponents(r); 1485 return corrected_url.ReplaceComponents(r);
1484 } 1486 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_io_data.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698