OLD | NEW |
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/strings/string_util.h" | 7 #include "base/strings/string_util.h" |
8 #include "content/browser/frame_host/debug_urls.h" | 8 #include "content/browser/frame_host/debug_urls.h" |
9 #include "content/browser/webui/web_ui_impl.h" | 9 #include "content/browser/webui/web_ui_impl.h" |
10 #include "content/public/browser/content_browser_client.h" | 10 #include "content/public/browser/content_browser_client.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 } | 78 } |
79 | 79 |
80 // static | 80 // static |
81 BrowserURLHandler::URLHandler BrowserURLHandler::null_handler() { | 81 BrowserURLHandler::URLHandler BrowserURLHandler::null_handler() { |
82 // Required for VS2010: http://connect.microsoft.com/VisualStudio/feedback/det
ails/520043/error-converting-from-null-to-a-pointer-type-in-std-pair | 82 // Required for VS2010: http://connect.microsoft.com/VisualStudio/feedback/det
ails/520043/error-converting-from-null-to-a-pointer-type-in-std-pair |
83 return NULL; | 83 return NULL; |
84 } | 84 } |
85 | 85 |
86 // static | 86 // static |
87 BrowserURLHandlerImpl* BrowserURLHandlerImpl::GetInstance() { | 87 BrowserURLHandlerImpl* BrowserURLHandlerImpl::GetInstance() { |
88 return Singleton<BrowserURLHandlerImpl>::get(); | 88 return base::Singleton<BrowserURLHandlerImpl>::get(); |
89 } | 89 } |
90 | 90 |
91 BrowserURLHandlerImpl::BrowserURLHandlerImpl() : | 91 BrowserURLHandlerImpl::BrowserURLHandlerImpl() : |
92 fixup_handler_(nullptr) { | 92 fixup_handler_(nullptr) { |
93 AddHandlerPair(&DebugURLHandler, BrowserURLHandlerImpl::null_handler()); | 93 AddHandlerPair(&DebugURLHandler, BrowserURLHandlerImpl::null_handler()); |
94 | 94 |
95 GetContentClient()->browser()->BrowserURLHandlerCreated(this); | 95 GetContentClient()->browser()->BrowserURLHandlerCreated(this); |
96 | 96 |
97 // view-source: | 97 // view-source: |
98 AddHandlerPair(&HandleViewSource, &ReverseViewSource); | 98 AddHandlerPair(&HandleViewSource, &ReverseViewSource); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 return true; | 143 return true; |
144 } else if (handler(&test_url, browser_context)) { | 144 } else if (handler(&test_url, browser_context)) { |
145 return reverse_rewriter(url, browser_context); | 145 return reverse_rewriter(url, browser_context); |
146 } | 146 } |
147 } | 147 } |
148 } | 148 } |
149 return false; | 149 return false; |
150 } | 150 } |
151 | 151 |
152 } // namespace content | 152 } // namespace content |
OLD | NEW |