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

Side by Side Diff: chrome/browser/ui/chrome_pages.cc

Issue 1704793002: Remove kDisableDownloadNotification and stop compiling shelf code on (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
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/chrome_pages.h" 5 #include "chrome/browser/ui/chrome_pages.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 void ShowHistory(Browser* browser) { 153 void ShowHistory(Browser* browser) {
154 content::RecordAction(UserMetricsAction("ShowHistory")); 154 content::RecordAction(UserMetricsAction("ShowHistory"));
155 NavigateParams params( 155 NavigateParams params(
156 GetSingletonTabNavigateParams(browser, GURL(kChromeUIHistoryURL))); 156 GetSingletonTabNavigateParams(browser, GURL(kChromeUIHistoryURL)));
157 params.path_behavior = NavigateParams::IGNORE_AND_NAVIGATE; 157 params.path_behavior = NavigateParams::IGNORE_AND_NAVIGATE;
158 ShowSingletonTabOverwritingNTP(browser, params); 158 ShowSingletonTabOverwritingNTP(browser, params);
159 } 159 }
160 160
161 void ShowDownloads(Browser* browser) { 161 void ShowDownloads(Browser* browser) {
162 content::RecordAction(UserMetricsAction("ShowDownloads")); 162 content::RecordAction(UserMetricsAction("ShowDownloads"));
163 #if !defined(OS_CHROMEOS)
163 if (browser->window() && browser->window()->IsDownloadShelfVisible()) 164 if (browser->window() && browser->window()->IsDownloadShelfVisible())
164 browser->window()->GetDownloadShelf()->Close(DownloadShelf::USER_ACTION); 165 browser->window()->GetDownloadShelf()->Close(DownloadShelf::USER_ACTION);
165 166 #endif
166 ShowSingletonTabOverwritingNTP( 167 ShowSingletonTabOverwritingNTP(
167 browser, 168 browser,
168 GetSingletonTabNavigateParams(browser, GURL(kChromeUIDownloadsURL))); 169 GetSingletonTabNavigateParams(browser, GURL(kChromeUIDownloadsURL)));
169 } 170 }
170 171
171 void ShowExtensions(Browser* browser, 172 void ShowExtensions(Browser* browser,
172 const std::string& extension_to_highlight) { 173 const std::string& extension_to_highlight) {
173 content::RecordAction(UserMetricsAction("ShowExtensions")); 174 content::RecordAction(UserMetricsAction("ShowExtensions"));
174 NavigateParams params( 175 NavigateParams params(
175 GetSingletonTabNavigateParams(browser, GURL(kChromeUIExtensionsURL))); 176 GetSingletonTabNavigateParams(browser, GURL(kChromeUIExtensionsURL)));
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 SigninManagerFactory::GetForProfile(original_profile); 405 SigninManagerFactory::GetForProfile(original_profile);
405 DCHECK(manager->IsSigninAllowed()); 406 DCHECK(manager->IsSigninAllowed());
406 if (manager->IsAuthenticated()) 407 if (manager->IsAuthenticated())
407 ShowSettings(browser); 408 ShowSettings(browser);
408 else 409 else
409 ShowBrowserSignin(browser, access_point); 410 ShowBrowserSignin(browser, access_point);
410 } 411 }
411 #endif 412 #endif
412 413
413 } // namespace chrome 414 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/exclusive_access/fullscreen_controller_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698