Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 <string> | |
| 8 | |
| 7 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 8 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| 9 #include "chrome/app/chrome_command_ids.h" | 11 #include "chrome/app/chrome_command_ids.h" |
| 10 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
| 11 #include "chrome/browser/chrome_notification_types.h" | 13 #include "chrome/browser/chrome_notification_types.h" |
| 12 #include "chrome/browser/defaults.h" | 14 #include "chrome/browser/defaults.h" |
| 13 #include "chrome/browser/extensions/extension_service.h" | 15 #include "chrome/browser/extensions/extension_service.h" |
| 14 #include "chrome/browser/extensions/extension_util.h" | 16 #include "chrome/browser/extensions/extension_util.h" |
| 15 #include "chrome/browser/lifetime/application_lifetime.h" | 17 #include "chrome/browser/lifetime/application_lifetime.h" |
| 16 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 18 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 158 } | 160 } |
| 159 delete this; | 161 delete this; |
| 160 } | 162 } |
| 161 | 163 |
| 162 void OnSetAsDefaultConcluded(bool success) override { | 164 void OnSetAsDefaultConcluded(bool success) override { |
| 163 if (!success) { | 165 if (!success) { |
| 164 delete this; | 166 delete this; |
| 165 return; | 167 return; |
| 166 } | 168 } |
| 167 first_check_ = false; | 169 first_check_ = false; |
| 168 default_browser_worker_->StartCheckIsDefault(); | |
|
grt (UTC plus 2)
2015/11/03 21:12:22
huh. was this never needed?
Patrick Monette
2015/11/10 19:22:47
StartCheckIsDefault() is already called in OnSetAs
| |
| 169 } | 170 } |
| 170 | 171 |
| 171 bool IsInteractiveSetDefaultPermitted() override { | 172 bool IsInteractiveSetDefaultPermitted() override { |
| 172 return true; | 173 return true; |
| 173 } | 174 } |
| 174 | 175 |
| 175 scoped_refptr<ShellIntegration::DefaultBrowserWorker> default_browser_worker_; | 176 scoped_refptr<ShellIntegration::DefaultBrowserWorker> default_browser_worker_; |
| 176 bool first_check_; | 177 bool first_check_; |
| 177 | 178 |
| 178 DISALLOW_COPY_AND_ASSIGN(SwitchToMetroUIHandler); | 179 DISALLOW_COPY_AND_ASSIGN(SwitchToMetroUIHandler); |
| (...skipping 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1373 | 1374 |
| 1374 BrowserWindow* BrowserCommandController::window() { | 1375 BrowserWindow* BrowserCommandController::window() { |
| 1375 return browser_->window(); | 1376 return browser_->window(); |
| 1376 } | 1377 } |
| 1377 | 1378 |
| 1378 Profile* BrowserCommandController::profile() { | 1379 Profile* BrowserCommandController::profile() { |
| 1379 return browser_->profile(); | 1380 return browser_->profile(); |
| 1380 } | 1381 } |
| 1381 | 1382 |
| 1382 } // namespace chrome | 1383 } // namespace chrome |
| OLD | NEW |