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

Side by Side Diff: chrome/browser/browser_url_handler.cc

Issue 18175: Change chrome:// to chrome-ui://, fix up one chrome-resource:// reference. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | chrome/browser/browsing_instance.cc » ('j') | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/browser_url_handler.h" 5 #include "chrome/browser/browser_url_handler.h"
6 6
7 #include "chrome/browser/browser_about_handler.h" 7 #include "chrome/browser/browser_about_handler.h"
8 #include "chrome/browser/dom_ui/new_tab_ui.h" 8 #include "chrome/browser/dom_ui/new_tab_ui.h"
9 #include "chrome/browser/dom_ui/dom_ui_contents.h" 9 #include "chrome/browser/dom_ui/dom_ui_contents.h"
10 10
11 std::vector<BrowserURLHandler::URLHandler> BrowserURLHandler::url_handlers_; 11 std::vector<BrowserURLHandler::URLHandler> BrowserURLHandler::url_handlers_;
12 12
13 // static 13 // static
14 void BrowserURLHandler::InitURLHandlers() { 14 void BrowserURLHandler::InitURLHandlers() {
15 if (!url_handlers_.empty()) 15 if (!url_handlers_.empty())
16 return; 16 return;
17 17
18 // Here is where we initialize the global list of handlers for special URLs. 18 // Here is where we initialize the global list of handlers for special URLs.
19 // about:* 19 // about:*
20 url_handlers_.push_back(&BrowserAboutHandler::MaybeHandle); 20 url_handlers_.push_back(&BrowserAboutHandler::MaybeHandle);
21 // chrome-internal:* 21 // chrome-internal:*
22 url_handlers_.push_back(&NewTabUIHandleURL); 22 url_handlers_.push_back(&NewTabUIHandleURL);
23 // chrome:* 23 // chrome-ui:*
24 url_handlers_.push_back(&DOMUIContentsCanHandleURL); 24 url_handlers_.push_back(&DOMUIContentsCanHandleURL);
25 } 25 }
26 26
27 // static 27 // static
28 bool BrowserURLHandler::HandleBrowserURL(GURL* url, TabContentsType* type) { 28 bool BrowserURLHandler::HandleBrowserURL(GURL* url, TabContentsType* type) {
29 if (url_handlers_.empty()) 29 if (url_handlers_.empty())
30 InitURLHandlers(); 30 InitURLHandlers();
31 for (size_t i = 0; i < url_handlers_.size(); ++i) { 31 for (size_t i = 0; i < url_handlers_.size(); ++i) {
32 if ((*url_handlers_[i])(url, type)) 32 if ((*url_handlers_[i])(url, type))
33 return true; 33 return true;
34 } 34 }
35 return false; 35 return false;
36 } 36 }
37 37
38 38
OLDNEW
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | chrome/browser/browsing_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698