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/browser_about_handler.h" | 5 #include "chrome/browser/browser_about_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 host = chrome::kChromeUISyncInternalsHost; | 127 host = chrome::kChromeUISyncInternalsHost; |
128 // Redirect chrome://extensions. | 128 // Redirect chrome://extensions. |
129 } else if (host == chrome::kChromeUIExtensionsHost) { | 129 } else if (host == chrome::kChromeUIExtensionsHost) { |
130 if (enableUberPage) { | 130 if (enableUberPage) { |
131 host = chrome::kChromeUIUberHost; | 131 host = chrome::kChromeUIUberHost; |
132 path = chrome::kChromeUIExtensionsHost + url->path(); | 132 path = chrome::kChromeUIExtensionsHost + url->path(); |
133 } else { | 133 } else { |
134 host = chrome::kChromeUISettingsHost; | 134 host = chrome::kChromeUISettingsHost; |
135 path = chrome::kExtensionsSubPage; | 135 path = chrome::kExtensionsSubPage; |
136 } | 136 } |
| 137 // Redirect chrome://settings/extensions. |
| 138 // TODO(csilv): Fix all code paths for this page once Uber page is enabled |
| 139 // permanently. |
| 140 } else if (enableUberPage && host == chrome::kChromeUISettingsHost && |
| 141 url->path() == std::string("/") + chrome::kExtensionsSubPage) { |
| 142 host = chrome::kChromeUIUberHost; |
| 143 path = chrome::kChromeUIExtensionsHost; |
137 // Redirect chrome://settings | 144 // Redirect chrome://settings |
138 } else if (enableUberPage && host == chrome::kChromeUISettingsHost) { | 145 } else if (enableUberPage && host == chrome::kChromeUISettingsHost) { |
139 host = chrome::kChromeUIUberHost; | 146 host = chrome::kChromeUIUberHost; |
140 path = chrome::kChromeUISettingsHost + url->path(); | 147 path = chrome::kChromeUISettingsHost + url->path(); |
141 } | 148 } |
142 GURL::Replacements replacements; | 149 GURL::Replacements replacements; |
143 replacements.SetHostStr(host); | 150 replacements.SetHostStr(host); |
144 if (!path.empty()) | 151 if (!path.empty()) |
145 replacements.SetPathStr(path); | 152 replacements.SetPathStr(path); |
146 *url = url->ReplaceComponents(replacements); | 153 *url = url->ReplaceComponents(replacements); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 AboutTcmallocOutputs::AboutTcmallocOutputs() {} | 239 AboutTcmallocOutputs::AboutTcmallocOutputs() {} |
233 | 240 |
234 AboutTcmallocOutputs::~AboutTcmallocOutputs() {} | 241 AboutTcmallocOutputs::~AboutTcmallocOutputs() {} |
235 | 242 |
236 // Glue between the callback task and the method in the singleton. | 243 // Glue between the callback task and the method in the singleton. |
237 void AboutTcmallocRendererCallback(base::ProcessId pid, | 244 void AboutTcmallocRendererCallback(base::ProcessId pid, |
238 const std::string& output) { | 245 const std::string& output) { |
239 AboutTcmallocOutputs::GetInstance()->RendererCallback(pid, output); | 246 AboutTcmallocOutputs::GetInstance()->RendererCallback(pid, output); |
240 } | 247 } |
241 #endif | 248 #endif |
OLD | NEW |