| 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(); | |
| 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 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1376 | 1377 |
| 1377 BrowserWindow* BrowserCommandController::window() { | 1378 BrowserWindow* BrowserCommandController::window() { |
| 1378 return browser_->window(); | 1379 return browser_->window(); |
| 1379 } | 1380 } |
| 1380 | 1381 |
| 1381 Profile* BrowserCommandController::profile() { | 1382 Profile* BrowserCommandController::profile() { |
| 1382 return browser_->profile(); | 1383 return browser_->profile(); |
| 1383 } | 1384 } |
| 1384 | 1385 |
| 1385 } // namespace chrome | 1386 } // namespace chrome |
| OLD | NEW |