| 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 "chrome/browser/profiles/profile_io_data.h" | 5 #include "chrome/browser/profiles/profile_io_data.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 154 |
| 155 namespace { | 155 namespace { |
| 156 | 156 |
| 157 #if defined(DEBUG_DEVTOOLS) | 157 #if defined(DEBUG_DEVTOOLS) |
| 158 bool IsSupportedDevToolsURL(const GURL& url, base::FilePath* path) { | 158 bool IsSupportedDevToolsURL(const GURL& url, base::FilePath* path) { |
| 159 std::string bundled_path_prefix(chrome::kChromeUIDevToolsBundledPath); | 159 std::string bundled_path_prefix(chrome::kChromeUIDevToolsBundledPath); |
| 160 bundled_path_prefix = "/" + bundled_path_prefix + "/"; | 160 bundled_path_prefix = "/" + bundled_path_prefix + "/"; |
| 161 | 161 |
| 162 if (!url.SchemeIs(content::kChromeDevToolsScheme) || | 162 if (!url.SchemeIs(content::kChromeDevToolsScheme) || |
| 163 url.host() != chrome::kChromeUIDevToolsHost || | 163 url.host() != chrome::kChromeUIDevToolsHost || |
| 164 !base::StartsWithASCII(url.path(), bundled_path_prefix, false)) { | 164 !base::StartsWith(url.path(), bundled_path_prefix, |
| 165 base::CompareCase::INSENSITIVE_ASCII)) { |
| 165 return false; | 166 return false; |
| 166 } | 167 } |
| 167 | 168 |
| 168 if (!url.is_valid()) { | 169 if (!url.is_valid()) { |
| 169 NOTREACHED(); | 170 NOTREACHED(); |
| 170 return false; | 171 return false; |
| 171 } | 172 } |
| 172 | 173 |
| 173 // Remove Query and Ref from URL. | 174 // Remove Query and Ref from URL. |
| 174 GURL stripped_url; | 175 GURL stripped_url; |
| (...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1296 new DevToolsNetworkTransactionFactory( | 1297 new DevToolsNetworkTransactionFactory( |
| 1297 network_controller_.get(), shared_session), | 1298 network_controller_.get(), shared_session), |
| 1298 shared_session->net_log(), backend)); | 1299 shared_session->net_log(), backend)); |
| 1299 } | 1300 } |
| 1300 | 1301 |
| 1301 void ProfileIOData::SetCookieSettingsForTesting( | 1302 void ProfileIOData::SetCookieSettingsForTesting( |
| 1302 content_settings::CookieSettings* cookie_settings) { | 1303 content_settings::CookieSettings* cookie_settings) { |
| 1303 DCHECK(!cookie_settings_.get()); | 1304 DCHECK(!cookie_settings_.get()); |
| 1304 cookie_settings_ = cookie_settings; | 1305 cookie_settings_ = cookie_settings; |
| 1305 } | 1306 } |
| OLD | NEW |