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

Side by Side Diff: chrome/browser/browser_about_handler.cc

Issue 9318019: [uber page] Improve URL mapping for extension URLS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/browser.cc » ('j') | 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/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
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.
James Hawkins 2012/02/01 00:47:09 Add a TODO to fix code paths that use chrome://set
csilv 2012/02/01 01:07:37 Done.
138 } else if (enableUberPage && host == chrome::kChromeUISettingsHost &&
139 url->path() == std::string("/") + chrome::kExtensionsSubPage) {
140 host = chrome::kChromeUIUberHost;
141 path = chrome::kChromeUIExtensionsHost;
137 // Redirect chrome://settings 142 // Redirect chrome://settings
138 } else if (enableUberPage && host == chrome::kChromeUISettingsHost) { 143 } else if (enableUberPage && host == chrome::kChromeUISettingsHost) {
139 host = chrome::kChromeUIUberHost; 144 host = chrome::kChromeUIUberHost;
140 path = chrome::kChromeUISettingsHost + url->path(); 145 path = chrome::kChromeUISettingsHost + url->path();
141 } 146 }
142 GURL::Replacements replacements; 147 GURL::Replacements replacements;
143 replacements.SetHostStr(host); 148 replacements.SetHostStr(host);
144 if (!path.empty()) 149 if (!path.empty())
145 replacements.SetPathStr(path); 150 replacements.SetPathStr(path);
146 *url = url->ReplaceComponents(replacements); 151 *url = url->ReplaceComponents(replacements);
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 AboutTcmallocOutputs::AboutTcmallocOutputs() {} 237 AboutTcmallocOutputs::AboutTcmallocOutputs() {}
233 238
234 AboutTcmallocOutputs::~AboutTcmallocOutputs() {} 239 AboutTcmallocOutputs::~AboutTcmallocOutputs() {}
235 240
236 // Glue between the callback task and the method in the singleton. 241 // Glue between the callback task and the method in the singleton.
237 void AboutTcmallocRendererCallback(base::ProcessId pid, 242 void AboutTcmallocRendererCallback(base::ProcessId pid,
238 const std::string& output) { 243 const std::string& output) {
239 AboutTcmallocOutputs::GetInstance()->RendererCallback(pid, output); 244 AboutTcmallocOutputs::GetInstance()->RendererCallback(pid, output);
240 } 245 }
241 #endif 246 #endif
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698