| 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/views/uninstall_view.h" | 5 #include "chrome/browser/ui/views/uninstall_view.h" |
| 6 | 6 |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/process/launch.h" | 8 #include "base/process/launch.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 111 |
| 112 bool UninstallView::Accept() { | 112 bool UninstallView::Accept() { |
| 113 user_selection_ = content::RESULT_CODE_NORMAL_EXIT; | 113 user_selection_ = content::RESULT_CODE_NORMAL_EXIT; |
| 114 if (delete_profile_->checked()) | 114 if (delete_profile_->checked()) |
| 115 user_selection_ = chrome::RESULT_CODE_UNINSTALL_DELETE_PROFILE; | 115 user_selection_ = chrome::RESULT_CODE_UNINSTALL_DELETE_PROFILE; |
| 116 if (change_default_browser_ && change_default_browser_->checked()) { | 116 if (change_default_browser_ && change_default_browser_->checked()) { |
| 117 BrowsersMap::const_iterator i = browsers_->begin(); | 117 BrowsersMap::const_iterator i = browsers_->begin(); |
| 118 std::advance(i, browsers_combo_->selected_index()); | 118 std::advance(i, browsers_combo_->selected_index()); |
| 119 base::LaunchOptions options; | 119 base::LaunchOptions options; |
| 120 options.start_hidden = true; | 120 options.start_hidden = true; |
| 121 base::LaunchProcess(i->second, options, NULL); | 121 base::LaunchProcess(i->second, options); |
| 122 } | 122 } |
| 123 return true; | 123 return true; |
| 124 } | 124 } |
| 125 | 125 |
| 126 bool UninstallView::Cancel() { | 126 bool UninstallView::Cancel() { |
| 127 user_selection_ = chrome::RESULT_CODE_UNINSTALL_USER_CANCEL; | 127 user_selection_ = chrome::RESULT_CODE_UNINSTALL_USER_CANCEL; |
| 128 return true; | 128 return true; |
| 129 } | 129 } |
| 130 | 130 |
| 131 base::string16 UninstallView::GetDialogButtonLabel( | 131 base::string16 UninstallView::GetDialogButtonLabel( |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 178 |
| 179 base::RunLoop run_loop; | 179 base::RunLoop run_loop; |
| 180 UninstallView* view = new UninstallView(&result, | 180 UninstallView* view = new UninstallView(&result, |
| 181 run_loop.QuitClosure()); | 181 run_loop.QuitClosure()); |
| 182 views::DialogDelegate::CreateDialogWidget(view, NULL, NULL)->Show(); | 182 views::DialogDelegate::CreateDialogWidget(view, NULL, NULL)->Show(); |
| 183 run_loop.Run(); | 183 run_loop.Run(); |
| 184 return result; | 184 return result; |
| 185 } | 185 } |
| 186 | 186 |
| 187 } // namespace chrome | 187 } // namespace chrome |
| OLD | NEW |