| 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/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_split.h" | 10 #include "base/strings/string_split.h" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 return "true"; | 137 return "true"; |
| 138 | 138 |
| 139 // Pass connection endpoints as is. | 139 // Pass connection endpoints as is. |
| 140 if (key == "ws" || key == "service-backend") | 140 if (key == "ws" || key == "service-backend") |
| 141 return SanitizeEndpoint(value); | 141 return SanitizeEndpoint(value); |
| 142 | 142 |
| 143 // Only support undocked for old frontends. | 143 // Only support undocked for old frontends. |
| 144 if (key == "dockSide" && value == "undocked") | 144 if (key == "dockSide" && value == "undocked") |
| 145 return value; | 145 return value; |
| 146 | 146 |
| 147 if (key == "panel" && (value == "elements" || value == "console")) |
| 148 return value; |
| 149 |
| 147 if (key == "remoteBase") | 150 if (key == "remoteBase") |
| 148 return SanitizeRemoteBase(value); | 151 return SanitizeRemoteBase(value); |
| 149 | 152 |
| 150 if (key == "remoteFrontendUrl") | 153 if (key == "remoteFrontendUrl") |
| 151 return SanitizeRemoteFrontendURL(value); | 154 return SanitizeRemoteFrontendURL(value); |
| 152 | 155 |
| 153 return std::string(); | 156 return std::string(); |
| 154 } | 157 } |
| 155 | 158 |
| 156 GURL SanitizeFrontendURL( | 159 GURL SanitizeFrontendURL( |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 if (profile->IsOffTheRecord()) { | 450 if (profile->IsOffTheRecord()) { |
| 448 GURL site = content::SiteInstance::GetSiteForURL(profile, url); | 451 GURL site = content::SiteInstance::GetSiteForURL(profile, url); |
| 449 content::BrowserContext::GetStoragePartitionForSite(profile, site)-> | 452 content::BrowserContext::GetStoragePartitionForSite(profile, site)-> |
| 450 GetFileSystemContext()->EnableTemporaryFileSystemInIncognito(); | 453 GetFileSystemContext()->EnableTemporaryFileSystemInIncognito(); |
| 451 } | 454 } |
| 452 bindings_.reset(new DevToolsUIBindings(web_ui->GetWebContents())); | 455 bindings_.reset(new DevToolsUIBindings(web_ui->GetWebContents())); |
| 453 } | 456 } |
| 454 | 457 |
| 455 DevToolsUI::~DevToolsUI() { | 458 DevToolsUI::~DevToolsUI() { |
| 456 } | 459 } |
| OLD | NEW |