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

Side by Side Diff: chrome/browser/ui/webui/chrome_url_data_manager_backend.cc

Issue 7068007: Revise about: and chrome: url handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update special_tabs.py from Nirnimesh's codereview.chromium.org/6995057/. Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser/ui/webui/chrome_url_data_manager_backend.h" 5 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 NotifyHeadersComplete(); 213 NotifyHeadersComplete();
214 } else { 214 } else {
215 NotifyStartError(net::URLRequestStatus(net::URLRequestStatus::FAILED, 215 NotifyStartError(net::URLRequestStatus(net::URLRequestStatus::FAILED,
216 net::ERR_INVALID_URL)); 216 net::ERR_INVALID_URL));
217 } 217 }
218 } 218 }
219 219
220 namespace { 220 namespace {
221 221
222 bool IsViewAppCacheInternalsURL(const GURL& url) { 222 bool IsViewAppCacheInternalsURL(const GURL& url) {
223 return StartsWithASCII(url.spec(), 223 return url.SchemeIs(chrome::kChromeUIScheme) &&
224 chrome::kAppCacheViewInternalsURL, 224 url.host() == chrome::kChromeUIAppCacheInternalsHost;
225 true /*case_sensitive*/);
226 } 225 }
227 226
228 class ChromeProtocolHandler 227 class ChromeProtocolHandler
229 : public net::URLRequestJobFactory::ProtocolHandler { 228 : public net::URLRequestJobFactory::ProtocolHandler {
230 public: 229 public:
231 ChromeProtocolHandler(ChromeURLDataManagerBackend* backend, 230 ChromeProtocolHandler(ChromeURLDataManagerBackend* backend,
232 ChromeAppCacheService* appcache_service); 231 ChromeAppCacheService* appcache_service);
233 ~ChromeProtocolHandler(); 232 ~ChromeProtocolHandler();
234 233
235 virtual net::URLRequestJob* MaybeCreateJob( 234 virtual net::URLRequestJob* MaybeCreateJob(
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 478
480 return new URLRequestChromeJob(request, backend_); 479 return new URLRequestChromeJob(request, backend_);
481 } 480 }
482 481
483 } // namespace 482 } // namespace
484 483
485 net::URLRequestJobFactory::ProtocolHandler* 484 net::URLRequestJobFactory::ProtocolHandler*
486 CreateDevToolsProtocolHandler(ChromeURLDataManagerBackend* backend) { 485 CreateDevToolsProtocolHandler(ChromeURLDataManagerBackend* backend) {
487 return new DevToolsJobFactory(backend); 486 return new DevToolsJobFactory(backend);
488 } 487 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/BidiCheckerWebUITest.cc ('k') | chrome/browser/ui/webui/chrome_web_ui_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698