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

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

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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/browser_command_controller.h" 5 #include "chrome/browser/ui/browser_command_controller.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 1008
1009 // These are always enabled; the menu determines their menu item visibility. 1009 // These are always enabled; the menu determines their menu item visibility.
1010 command_updater_.UpdateCommandEnabled(IDC_UPGRADE_DIALOG, true); 1010 command_updater_.UpdateCommandEnabled(IDC_UPGRADE_DIALOG, true);
1011 command_updater_.UpdateCommandEnabled(IDC_VIEW_INCOMPATIBILITIES, true); 1011 command_updater_.UpdateCommandEnabled(IDC_VIEW_INCOMPATIBILITIES, true);
1012 1012
1013 // Toggle speech input 1013 // Toggle speech input
1014 command_updater_.UpdateCommandEnabled(IDC_TOGGLE_SPEECH_INPUT, true); 1014 command_updater_.UpdateCommandEnabled(IDC_TOGGLE_SPEECH_INPUT, true);
1015 1015
1016 // Distill current page. 1016 // Distill current page.
1017 command_updater_.UpdateCommandEnabled( 1017 command_updater_.UpdateCommandEnabled(
1018 IDC_DISTILL_PAGE, 1018 IDC_DISTILL_PAGE, base::CommandLine::ForCurrentProcess()->HasSwitch(
1019 CommandLine::ForCurrentProcess()->HasSwitch( 1019 switches::kEnableDomDistiller));
1020 switches::kEnableDomDistiller));
1021 1020
1022 // Initialize other commands whose state changes based on various conditions. 1021 // Initialize other commands whose state changes based on various conditions.
1023 UpdateCommandsForFullscreenMode(); 1022 UpdateCommandsForFullscreenMode();
1024 UpdateCommandsForContentRestrictionState(); 1023 UpdateCommandsForContentRestrictionState();
1025 UpdateCommandsForBookmarkEditing(); 1024 UpdateCommandsForBookmarkEditing();
1026 UpdateCommandsForIncognitoAvailability(); 1025 UpdateCommandsForIncognitoAvailability();
1027 } 1026 }
1028 1027
1029 // static 1028 // static
1030 void BrowserCommandController::UpdateSharedCommandsForIncognitoAvailability( 1029 void BrowserCommandController::UpdateSharedCommandsForIncognitoAvailability(
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
1347 1346
1348 BrowserWindow* BrowserCommandController::window() { 1347 BrowserWindow* BrowserCommandController::window() {
1349 return browser_->window(); 1348 return browser_->window();
1350 } 1349 }
1351 1350
1352 Profile* BrowserCommandController::profile() { 1351 Profile* BrowserCommandController::profile() {
1353 return browser_->profile(); 1352 return browser_->profile();
1354 } 1353 }
1355 1354
1356 } // namespace chrome 1355 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/browser_command_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698