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

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

Issue 1319163004: [Extensions Page MD] Stub out a materialized extensions page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 5 years, 3 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 | chrome/browser/browser_resources.grd » ('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/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 if (host == chrome::kChromeUIAboutHost) 48 if (host == chrome::kChromeUIAboutHost)
49 host = chrome::kChromeUIChromeURLsHost; 49 host = chrome::kChromeUIChromeURLsHost;
50 // Replace cache with view-http-cache. 50 // Replace cache with view-http-cache.
51 if (host == chrome::kChromeUICacheHost) { 51 if (host == chrome::kChromeUICacheHost) {
52 host = content::kChromeUINetworkViewCacheHost; 52 host = content::kChromeUINetworkViewCacheHost;
53 // Replace sync with sync-internals (for legacy reasons). 53 // Replace sync with sync-internals (for legacy reasons).
54 } else if (host == chrome::kChromeUISyncHost) { 54 } else if (host == chrome::kChromeUISyncHost) {
55 host = chrome::kChromeUISyncInternalsHost; 55 host = chrome::kChromeUISyncInternalsHost;
56 // Redirect chrome://extensions. 56 // Redirect chrome://extensions.
57 } else if (host == chrome::kChromeUIExtensionsHost) { 57 } else if (host == chrome::kChromeUIExtensionsHost) {
58 host = chrome::kChromeUIUberHost; 58 // If the material design extensions page is enabled, it gets its own host.
59 path = chrome::kChromeUIExtensionsHost + url->path(); 59 // Otherwise, it's handled by the uber settings page.
60 if (::switches::MdExtensionsEnabled()) {
61 host = chrome::kChromeUIExtensionsHost;
62 path = url->path();
63 } else {
64 host = chrome::kChromeUIUberHost;
65 path = chrome::kChromeUIExtensionsHost + url->path();
66 }
60 // Redirect chrome://settings/extensions (legacy URL). 67 // Redirect chrome://settings/extensions (legacy URL).
61 } else if (host == chrome::kChromeUISettingsHost && 68 } else if (host == chrome::kChromeUISettingsHost &&
62 url->path() == std::string("/") + chrome::kExtensionsSubPage) { 69 url->path() == std::string("/") + chrome::kExtensionsSubPage) {
63 host = chrome::kChromeUIUberHost; 70 host = chrome::kChromeUIUberHost;
64 path = chrome::kChromeUIExtensionsHost; 71 path = chrome::kChromeUIExtensionsHost;
65 // Redirect chrome://history. 72 // Redirect chrome://history.
66 } else if (host == chrome::kChromeUIHistoryHost) { 73 } else if (host == chrome::kChromeUIHistoryHost) {
67 #if defined(OS_ANDROID) 74 #if defined(OS_ANDROID)
68 // On Android, redirect directly to chrome://history-frame since 75 // On Android, redirect directly to chrome://history-frame since
69 // uber page is unsupported. 76 // uber page is unsupported.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 FROM_HERE, base::Bind(&chrome::AttemptRestart)); 119 FROM_HERE, base::Bind(&chrome::AttemptRestart));
113 return true; 120 return true;
114 } else if (base::LowerCaseEqualsASCII(spec, chrome::kChromeUIQuitURL)) { 121 } else if (base::LowerCaseEqualsASCII(spec, chrome::kChromeUIQuitURL)) {
115 base::ThreadTaskRunnerHandle::Get()->PostTask( 122 base::ThreadTaskRunnerHandle::Get()->PostTask(
116 FROM_HERE, base::Bind(&chrome::AttemptExit)); 123 FROM_HERE, base::Bind(&chrome::AttemptExit));
117 return true; 124 return true;
118 } 125 }
119 126
120 return false; 127 return false;
121 } 128 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browser_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698