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

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

Issue 2451363002: [DevTools] Move main target/connection to TargetManager. (Closed)
Patch Set: Created 4 years, 1 month 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 relative_path.assign(spec.substr(offset + bundled_path_prefix.length())); 209 relative_path.assign(spec.substr(offset + bundled_path_prefix.length()));
210 210
211 // Check that |relative_path| is not an absolute path (otherwise 211 // Check that |relative_path| is not an absolute path (otherwise
212 // AppendASCII() will DCHECK). The awkward use of StringType is because on 212 // AppendASCII() will DCHECK). The awkward use of StringType is because on
213 // some systems FilePath expects a std::string, but on others a std::wstring. 213 // some systems FilePath expects a std::string, but on others a std::wstring.
214 base::FilePath p( 214 base::FilePath p(
215 base::FilePath::StringType(relative_path.begin(), relative_path.end())); 215 base::FilePath::StringType(relative_path.begin(), relative_path.end()));
216 if (p.IsAbsolute()) 216 if (p.IsAbsolute())
217 return false; 217 return false;
218 218
219 base::FilePath inspector_dir; 219 base::FilePath inspector_debug_dir;
220 if (!PathService::Get(chrome::DIR_INSPECTOR, &inspector_dir)) 220 if (!PathService::Get(chrome::DIR_INSPECTOR_DEBUG, &inspector_debug_dir))
221 return false; 221 return false;
222 222
223 if (inspector_dir.empty()) 223 if (inspector_debug_dir.empty())
224 return false; 224 return false;
225 225
226 // Use the non-bundled and non-minified devtools app for development 226 *path = inspector_debug_dir.AppendASCII(relative_path);
227 *path = inspector_dir.AppendASCII("debug").AppendASCII(relative_path);
228 return true; 227 return true;
229 } 228 }
230 229
231 class DebugDevToolsInterceptor : public net::URLRequestInterceptor { 230 class DebugDevToolsInterceptor : public net::URLRequestInterceptor {
232 public: 231 public:
233 // net::URLRequestInterceptor implementation. 232 // net::URLRequestInterceptor implementation.
234 net::URLRequestJob* MaybeInterceptRequest( 233 net::URLRequestJob* MaybeInterceptRequest(
235 net::URLRequest* request, 234 net::URLRequest* request,
236 net::NetworkDelegate* network_delegate) const override { 235 net::NetworkDelegate* network_delegate) const override {
237 base::FilePath path; 236 base::FilePath path;
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1351 void ProfileIOData::SetCookieSettingsForTesting( 1350 void ProfileIOData::SetCookieSettingsForTesting(
1352 content_settings::CookieSettings* cookie_settings) { 1351 content_settings::CookieSettings* cookie_settings) {
1353 DCHECK(!cookie_settings_.get()); 1352 DCHECK(!cookie_settings_.get());
1354 cookie_settings_ = cookie_settings; 1353 cookie_settings_ = cookie_settings;
1355 } 1354 }
1356 1355
1357 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( 1356 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState(
1358 const GURL& url) const { 1357 const GURL& url) const {
1359 return url_blacklist_manager_->GetURLBlacklistState(url); 1358 return url_blacklist_manager_->GetURLBlacklistState(url);
1360 } 1359 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698