OLD | NEW |
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/dom_ui/chrome_url_data_manager.h" | 5 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 inspector_dir); | 109 inspector_dir); |
110 } | 110 } |
111 | 111 |
112 URLRequest::RegisterProtocolFactory(kChromeURLScheme, | 112 URLRequest::RegisterProtocolFactory(kChromeURLScheme, |
113 &ChromeURLDataManager::Factory); | 113 &ChromeURLDataManager::Factory); |
114 URLRequest::RegisterProtocolFactory(chrome::kPrintScheme, | 114 URLRequest::RegisterProtocolFactory(chrome::kPrintScheme, |
115 &ChromeURLDataManager::Factory); | 115 &ChromeURLDataManager::Factory); |
116 } | 116 } |
117 | 117 |
118 void UnregisterURLRequestChromeJob() { | 118 void UnregisterURLRequestChromeJob() { |
119 std::wstring inspector_dir; | 119 FilePath inspector_dir; |
120 if (PathService::Get(chrome::DIR_INSPECTOR, &inspector_dir)) { | 120 if (PathService::Get(chrome::DIR_INSPECTOR, &inspector_dir)) { |
121 chrome_url_data_manager.RemoveFileSource("inspector"); | 121 chrome_url_data_manager.RemoveFileSource("inspector"); |
122 chrome_url_data_manager.RemoveFileSource(chrome::kChromeUIDevToolsHost); | 122 chrome_url_data_manager.RemoveFileSource(chrome::kChromeUIDevToolsHost); |
123 } | 123 } |
124 } | 124 } |
125 | 125 |
126 // static | 126 // static |
127 void ChromeURLDataManager::URLToRequest(const GURL& url, | 127 void ChromeURLDataManager::URLToRequest(const GURL& url, |
128 std::string* source_name, | 128 std::string* source_name, |
129 std::string* path) { | 129 std::string* path) { |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 net::ERR_INVALID_URL)); | 390 net::ERR_INVALID_URL)); |
391 } | 391 } |
392 } | 392 } |
393 | 393 |
394 URLRequestChromeFileJob::URLRequestChromeFileJob(URLRequest* request, | 394 URLRequestChromeFileJob::URLRequestChromeFileJob(URLRequest* request, |
395 const FilePath& path) | 395 const FilePath& path) |
396 : URLRequestFileJob(request, path) { | 396 : URLRequestFileJob(request, path) { |
397 } | 397 } |
398 | 398 |
399 URLRequestChromeFileJob::~URLRequestChromeFileJob() { } | 399 URLRequestChromeFileJob::~URLRequestChromeFileJob() { } |
OLD | NEW |