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

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

Issue 1100223002: Update {virtual,override} to follow C++11 style in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 8 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/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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 class SwitchToMetroUIHandler 123 class SwitchToMetroUIHandler
124 : public ShellIntegration::DefaultWebClientObserver { 124 : public ShellIntegration::DefaultWebClientObserver {
125 public: 125 public:
126 SwitchToMetroUIHandler() 126 SwitchToMetroUIHandler()
127 : default_browser_worker_( 127 : default_browser_worker_(
128 new ShellIntegration::DefaultBrowserWorker(this)), 128 new ShellIntegration::DefaultBrowserWorker(this)),
129 first_check_(true) { 129 first_check_(true) {
130 default_browser_worker_->StartCheckIsDefault(); 130 default_browser_worker_->StartCheckIsDefault();
131 } 131 }
132 132
133 virtual ~SwitchToMetroUIHandler() { 133 ~SwitchToMetroUIHandler() override {
134 default_browser_worker_->ObserverDestroyed(); 134 default_browser_worker_->ObserverDestroyed();
135 } 135 }
136 136
137 private: 137 private:
138 virtual void SetDefaultWebClientUIState( 138 void SetDefaultWebClientUIState(
139 ShellIntegration::DefaultWebClientUIState state) override { 139 ShellIntegration::DefaultWebClientUIState state) override {
140 switch (state) { 140 switch (state) {
141 case ShellIntegration::STATE_PROCESSING: 141 case ShellIntegration::STATE_PROCESSING:
142 return; 142 return;
143 case ShellIntegration::STATE_UNKNOWN : 143 case ShellIntegration::STATE_UNKNOWN :
144 break; 144 break;
145 case ShellIntegration::STATE_IS_DEFAULT: 145 case ShellIntegration::STATE_IS_DEFAULT:
146 chrome::AttemptRestartToMetroMode(); 146 chrome::AttemptRestartToMetroMode();
147 break; 147 break;
148 case ShellIntegration::STATE_NOT_DEFAULT: 148 case ShellIntegration::STATE_NOT_DEFAULT:
149 if (first_check_) { 149 if (first_check_) {
150 default_browser_worker_->StartSetAsDefault(); 150 default_browser_worker_->StartSetAsDefault();
151 return; 151 return;
152 } 152 }
153 break; 153 break;
154 default: 154 default:
155 NOTREACHED(); 155 NOTREACHED();
156 } 156 }
157 delete this; 157 delete this;
158 } 158 }
159 159
160 virtual void OnSetAsDefaultConcluded(bool success) override { 160 void OnSetAsDefaultConcluded(bool success) override {
161 if (!success) { 161 if (!success) {
162 delete this; 162 delete this;
163 return; 163 return;
164 } 164 }
165 first_check_ = false; 165 first_check_ = false;
166 default_browser_worker_->StartCheckIsDefault(); 166 default_browser_worker_->StartCheckIsDefault();
167 } 167 }
168 168
169 virtual bool IsInteractiveSetDefaultPermitted() override { 169 bool IsInteractiveSetDefaultPermitted() override {
170 return true; 170 return true;
171 } 171 }
172 172
173 scoped_refptr<ShellIntegration::DefaultBrowserWorker> default_browser_worker_; 173 scoped_refptr<ShellIntegration::DefaultBrowserWorker> default_browser_worker_;
174 bool first_check_; 174 bool first_check_;
175 175
176 DISALLOW_COPY_AND_ASSIGN(SwitchToMetroUIHandler); 176 DISALLOW_COPY_AND_ASSIGN(SwitchToMetroUIHandler);
177 }; 177 };
178 #endif // defined(OS_WIN) 178 #endif // defined(OS_WIN)
179 179
(...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after
1357 1357
1358 BrowserWindow* BrowserCommandController::window() { 1358 BrowserWindow* BrowserCommandController::window() {
1359 return browser_->window(); 1359 return browser_->window();
1360 } 1360 }
1361 1361
1362 Profile* BrowserCommandController::profile() { 1362 Profile* BrowserCommandController::profile() {
1363 return browser_->profile(); 1363 return browser_->profile();
1364 } 1364 }
1365 1365
1366 } // namespace chrome 1366 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698