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

Side by Side Diff: content/browser/browser_url_handler_impl.cc

Issue 325443002: Move about://-related constants from //content to //url (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
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 "content/browser/browser_url_handler_impl.h" 5 #include "content/browser/browser_url_handler_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "cc/base/switches.h" 9 #include "cc/base/switches.h"
10 #include "content/browser/frame_host/debug_urls.h" 10 #include "content/browser/frame_host/debug_urls.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 bool is_sub_scheme_allowed = false; 44 bool is_sub_scheme_allowed = false;
45 for (size_t i = 0; i < all_allowed_sub_schemes.size(); ++i) { 45 for (size_t i = 0; i < all_allowed_sub_schemes.size(); ++i) {
46 if (url->SchemeIs(all_allowed_sub_schemes[i].c_str())) { 46 if (url->SchemeIs(all_allowed_sub_schemes[i].c_str())) {
47 is_sub_scheme_allowed = true; 47 is_sub_scheme_allowed = true;
48 break; 48 break;
49 } 49 }
50 } 50 }
51 51
52 if (!is_sub_scheme_allowed) { 52 if (!is_sub_scheme_allowed) {
53 *url = GURL(kAboutBlankURL); 53 *url = GURL(url::kAboutBlankURL);
54 return false; 54 return false;
55 } 55 }
56 56
57 return true; 57 return true;
58 } 58 }
59 return false; 59 return false;
60 } 60 }
61 61
62 // Turns a non view-source URL into the corresponding view-source URL. 62 // Turns a non view-source URL into the corresponding view-source URL.
63 static bool ReverseViewSource(GURL* url, BrowserContext* browser_context) { 63 static bool ReverseViewSource(GURL* url, BrowserContext* browser_context) {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 return true; 147 return true;
148 } else if (handler(&test_url, browser_context)) { 148 } else if (handler(&test_url, browser_context)) {
149 return reverse_rewriter(url, browser_context); 149 return reverse_rewriter(url, browser_context);
150 } 150 }
151 } 151 }
152 } 152 }
153 return false; 153 return false;
154 } 154 }
155 155
156 } // namespace content 156 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698