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

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

Issue 101026: Change chrome-ui to chrome. I didn't go too far in converting existing string... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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/debugger/debugger_view.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 "base/string_util.h" 7 #include "base/string_util.h"
8 #include "chrome/browser/browser_about_handler.h" 8 #include "chrome/browser/browser_about_handler.h"
9 #include "chrome/browser/dom_ui/dom_ui_factory.h" 9 #include "chrome/browser/dom_ui/dom_ui_factory.h"
10 #include "chrome/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
(...skipping 18 matching lines...) Expand all
29 29
30 std::vector<BrowserURLHandler::URLHandler> BrowserURLHandler::url_handlers_; 30 std::vector<BrowserURLHandler::URLHandler> BrowserURLHandler::url_handlers_;
31 31
32 // static 32 // static
33 void BrowserURLHandler::InitURLHandlers() { 33 void BrowserURLHandler::InitURLHandlers() {
34 if (!url_handlers_.empty()) 34 if (!url_handlers_.empty())
35 return; 35 return;
36 36
37 // Add the default URL handlers. 37 // Add the default URL handlers.
38 url_handlers_.push_back(&WillHandleBrowserAboutURL); // about: 38 url_handlers_.push_back(&WillHandleBrowserAboutURL); // about:
39 url_handlers_.push_back(&HandleDOMUI); // chrome-ui: & friends. 39 url_handlers_.push_back(&HandleDOMUI); // chrome: & friends.
40 url_handlers_.push_back(&HandleViewSource); // view-source: 40 url_handlers_.push_back(&HandleViewSource); // view-source:
41 } 41 }
42 42
43 // static 43 // static
44 void BrowserURLHandler::RewriteURLIfNecessary(GURL* url) { 44 void BrowserURLHandler::RewriteURLIfNecessary(GURL* url) {
45 if (url_handlers_.empty()) 45 if (url_handlers_.empty())
46 InitURLHandlers(); 46 InitURLHandlers();
47 for (size_t i = 0; i < url_handlers_.size(); ++i) { 47 for (size_t i = 0; i < url_handlers_.size(); ++i) {
48 if ((*url_handlers_[i])(url)) 48 if ((*url_handlers_[i])(url))
49 return; 49 return;
50 } 50 }
51 } 51 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | chrome/browser/debugger/debugger_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698