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

Side by Side Diff: content/shell/browser/shell_content_browser_client.cc

Issue 273193004: Move some content url constants to /url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing files. 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/shell/browser/shell_content_browser_client.h" 5 #include "content/shell/browser/shell_content_browser_client.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/file.h" 10 #include "base/files/file.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 protocol_interceptors.Pass()); 185 protocol_interceptors.Pass());
186 } 186 }
187 187
188 bool ShellContentBrowserClient::IsHandledURL(const GURL& url) { 188 bool ShellContentBrowserClient::IsHandledURL(const GURL& url) {
189 if (!url.is_valid()) 189 if (!url.is_valid())
190 return false; 190 return false;
191 DCHECK_EQ(url.scheme(), StringToLowerASCII(url.scheme())); 191 DCHECK_EQ(url.scheme(), StringToLowerASCII(url.scheme()));
192 // Keep in sync with ProtocolHandlers added by 192 // Keep in sync with ProtocolHandlers added by
193 // ShellURLRequestContextGetter::GetURLRequestContext(). 193 // ShellURLRequestContextGetter::GetURLRequestContext().
194 static const char* const kProtocolList[] = { 194 static const char* const kProtocolList[] = {
195 kBlobScheme, 195 url::kBlobScheme,
196 kFileSystemScheme, 196 url::kFileSystemScheme,
197 kChromeUIScheme, 197 kChromeUIScheme,
198 kChromeDevToolsScheme, 198 kChromeDevToolsScheme,
199 kDataScheme, 199 url::kDataScheme,
200 kFileScheme, 200 url::kFileScheme,
201 }; 201 };
202 for (size_t i = 0; i < arraysize(kProtocolList); ++i) { 202 for (size_t i = 0; i < arraysize(kProtocolList); ++i) {
203 if (url.scheme() == kProtocolList[i]) 203 if (url.scheme() == kProtocolList[i])
204 return true; 204 return true;
205 } 205 }
206 return false; 206 return false;
207 } 207 }
208 208
209 void ShellContentBrowserClient::AppendExtraCommandLineSwitches( 209 void ShellContentBrowserClient::AppendExtraCommandLineSwitches(
210 CommandLine* command_line, int child_process_id) { 210 CommandLine* command_line, int child_process_id) {
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 ShellBrowserContext* 366 ShellBrowserContext*
367 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( 367 ShellContentBrowserClient::ShellBrowserContextForBrowserContext(
368 BrowserContext* content_browser_context) { 368 BrowserContext* content_browser_context) {
369 if (content_browser_context == browser_context()) 369 if (content_browser_context == browser_context())
370 return browser_context(); 370 return browser_context();
371 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); 371 DCHECK_EQ(content_browser_context, off_the_record_browser_context());
372 return off_the_record_browser_context(); 372 return off_the_record_browser_context();
373 } 373 }
374 374
375 } // namespace content 375 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/web_ui_extension.cc ('k') | content/shell/browser/shell_url_request_context_getter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698