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

Side by Side Diff: chrome/browser/profiles/profile_io_data.cc

Issue 1220963005: Update base::StartsWith calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@starts_with
Patch Set: Created 5 years, 5 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
OLDNEW
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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 153
154 namespace { 154 namespace {
155 155
156 #if defined(DEBUG_DEVTOOLS) 156 #if defined(DEBUG_DEVTOOLS)
157 bool IsSupportedDevToolsURL(const GURL& url, base::FilePath* path) { 157 bool IsSupportedDevToolsURL(const GURL& url, base::FilePath* path) {
158 std::string bundled_path_prefix(chrome::kChromeUIDevToolsBundledPath); 158 std::string bundled_path_prefix(chrome::kChromeUIDevToolsBundledPath);
159 bundled_path_prefix = "/" + bundled_path_prefix + "/"; 159 bundled_path_prefix = "/" + bundled_path_prefix + "/";
160 160
161 if (!url.SchemeIs(content::kChromeDevToolsScheme) || 161 if (!url.SchemeIs(content::kChromeDevToolsScheme) ||
162 url.host() != chrome::kChromeUIDevToolsHost || 162 url.host() != chrome::kChromeUIDevToolsHost ||
163 !base::StartsWithASCII(url.path(), bundled_path_prefix, false)) { 163 !base::StartsWith(url.path(), bundled_path_prefix,
164 base::CompareCase::INSENSITIVE_ASCII)) {
164 return false; 165 return false;
165 } 166 }
166 167
167 if (!url.is_valid()) { 168 if (!url.is_valid()) {
168 NOTREACHED(); 169 NOTREACHED();
169 return false; 170 return false;
170 } 171 }
171 172
172 // Remove Query and Ref from URL. 173 // Remove Query and Ref from URL.
173 GURL stripped_url; 174 GURL stripped_url;
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1295 new DevToolsNetworkTransactionFactory( 1296 new DevToolsNetworkTransactionFactory(
1296 network_controller_.get(), shared_session), 1297 network_controller_.get(), shared_session),
1297 shared_session->net_log(), backend)); 1298 shared_session->net_log(), backend));
1298 } 1299 }
1299 1300
1300 void ProfileIOData::SetCookieSettingsForTesting( 1301 void ProfileIOData::SetCookieSettingsForTesting(
1301 CookieSettings* cookie_settings) { 1302 CookieSettings* cookie_settings) {
1302 DCHECK(!cookie_settings_.get()); 1303 DCHECK(!cookie_settings_.get());
1303 cookie_settings_ = cookie_settings; 1304 cookie_settings_ = cookie_settings;
1304 } 1305 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698