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

Side by Side Diff: chrome/browser/ui/webui/devtools_ui.cc

Issue 2691083002: [DevTools] Allow bundled DevTools for Node targets (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ui/webui/devtools_ui.h" 5 #include "chrome/browser/ui/webui/devtools_ui.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted_memory.h" 9 #include "base/memory/ref_counted_memory.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 pending_.erase(it); 273 pending_.erase(it);
274 } 274 }
275 275
276 } // namespace 276 } // namespace
277 277
278 // DevToolsUI ----------------------------------------------------------------- 278 // DevToolsUI -----------------------------------------------------------------
279 279
280 // static 280 // static
281 GURL DevToolsUI::GetProxyURL(const std::string& frontend_url) { 281 GURL DevToolsUI::GetProxyURL(const std::string& frontend_url) {
282 GURL url(frontend_url); 282 GURL url(frontend_url);
283 if (url.scheme() == content::kChromeDevToolsScheme &&
284 url.host() == chrome::kChromeUIDevToolsHost)
285 return GURL();
286
283 if (!url.is_valid() || url.host() != kRemoteFrontendDomain) 287 if (!url.is_valid() || url.host() != kRemoteFrontendDomain)
284 return GURL(kFallbackFrontendURL); 288 return GURL(kFallbackFrontendURL);
285 return GURL(base::StringPrintf("%s://%s/%s/%s", 289 return GURL(base::StringPrintf("%s://%s/%s/%s",
286 content::kChromeDevToolsScheme, 290 content::kChromeDevToolsScheme,
287 chrome::kChromeUIDevToolsHost, 291 chrome::kChromeUIDevToolsHost,
288 chrome::kChromeUIDevToolsRemotePath, 292 chrome::kChromeUIDevToolsRemotePath,
289 url.path().substr(1).c_str())); 293 url.path().substr(1).c_str()));
290 } 294 }
291 295
292 // static 296 // static
(...skipping 16 matching lines...) Expand all
309 if (!profile->IsOffTheRecord()) 313 if (!profile->IsOffTheRecord())
310 return; 314 return;
311 GURL url = web_ui->GetWebContents()->GetVisibleURL(); 315 GURL url = web_ui->GetWebContents()->GetVisibleURL();
312 GURL site = content::SiteInstance::GetSiteForURL(profile, url); 316 GURL site = content::SiteInstance::GetSiteForURL(profile, url);
313 content::BrowserContext::GetStoragePartitionForSite(profile, site)-> 317 content::BrowserContext::GetStoragePartitionForSite(profile, site)->
314 GetFileSystemContext()->EnableTemporaryFileSystemInIncognito(); 318 GetFileSystemContext()->EnableTemporaryFileSystemInIncognito();
315 } 319 }
316 320
317 DevToolsUI::~DevToolsUI() { 321 DevToolsUI::~DevToolsUI() {
318 } 322 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698