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

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

Issue 2458793003: 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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(dom_distiller_scheme); 388 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(dom_distiller_scheme);
389 389
390 #if defined(OS_CHROMEOS) 390 #if defined(OS_CHROMEOS)
391 WebSecurityPolicy::registerURLSchemeAsLocal( 391 WebSecurityPolicy::registerURLSchemeAsLocal(
392 WebString::fromUTF8(content::kExternalFileScheme)); 392 WebString::fromUTF8(content::kExternalFileScheme));
393 #endif 393 #endif
394 394
395 #if defined(OS_ANDROID) 395 #if defined(OS_ANDROID)
396 WebSecurityPolicy::registerURLSchemeAsAllowedForReferrer( 396 WebSecurityPolicy::registerURLSchemeAsAllowedForReferrer(
397 WebString::fromUTF8(chrome::kAndroidAppScheme)); 397 WebString::fromUTF8(chrome::kAndroidAppScheme));
398 WebSecurityPolicy::registerURLSchemeAsLocal(
399 WebString::fromUTF8(url::kContentScheme));
398 #endif 400 #endif
399 401
400 // chrome-search: pages should not be accessible by bookmarklets 402 // chrome-search: pages should not be accessible by bookmarklets
401 // or javascript: URLs typed in the omnibox. 403 // or javascript: URLs typed in the omnibox.
402 WebSecurityPolicy::registerURLSchemeAsNotAllowingJavascriptURLs( 404 WebSecurityPolicy::registerURLSchemeAsNotAllowingJavascriptURLs(
403 chrome_search_scheme); 405 chrome_search_scheme);
404 406
405 // chrome-search: resources shouldn't trigger insecure content warnings. Note 407 // chrome-search: resources shouldn't trigger insecure content warnings. Note
406 // that chrome-extension: and chrome-extension-resource: schemes are taken 408 // that chrome-extension: and chrome-extension-resource: schemes are taken
407 // care of in extensions::Dispatcher. 409 // care of in extensions::Dispatcher.
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
1470 1472
1471 url::Replacements<char> r; 1473 url::Replacements<char> r;
1472 r.SetPath(path.c_str(), url::Component(0, path.length())); 1474 r.SetPath(path.c_str(), url::Component(0, path.length()));
1473 1475
1474 if (result == internal::NUM_PLUGIN_ERROR) 1476 if (result == internal::NUM_PLUGIN_ERROR)
1475 result = invalid_url ? internal::SUCCESS_PARAMS_REWRITE : internal::SUCCESS; 1477 result = invalid_url ? internal::SUCCESS_PARAMS_REWRITE : internal::SUCCESS;
1476 1478
1477 RecordYouTubeRewriteUMA(result); 1479 RecordYouTubeRewriteUMA(result);
1478 return corrected_url.ReplaceComponents(r); 1480 return corrected_url.ReplaceComponents(r);
1479 } 1481 }
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