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

Side by Side Diff: chrome/browser/ui/views/uninstall_view.cc

Issue 14307023: chrome: Use base::MessageLoop. (Part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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 | Annotate | Revision Log
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/views/uninstall_view.h" 5 #include "chrome/browser/ui/views/uninstall_view.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/process_util.h" 8 #include "base/process_util.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "chrome/browser/shell_integration.h" 10 #include "chrome/browser/shell_integration.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 string16 UninstallView::GetItemAt(int index) { 156 string16 UninstallView::GetItemAt(int index) {
157 DCHECK_LT(index, static_cast<int>(browsers_->size())); 157 DCHECK_LT(index, static_cast<int>(browsers_->size()));
158 BrowsersMap::const_iterator i = browsers_->begin(); 158 BrowsersMap::const_iterator i = browsers_->begin();
159 std::advance(i, index); 159 std::advance(i, index);
160 return i->first; 160 return i->first;
161 } 161 }
162 162
163 namespace chrome { 163 namespace chrome {
164 164
165 int ShowUninstallBrowserPrompt(bool show_delete_profile) { 165 int ShowUninstallBrowserPrompt(bool show_delete_profile) {
166 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); 166 DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type());
167 int result = content::RESULT_CODE_NORMAL_EXIT; 167 int result = content::RESULT_CODE_NORMAL_EXIT;
168 views::AcceleratorHandler accelerator_handler; 168 views::AcceleratorHandler accelerator_handler;
169 base::RunLoop run_loop(&accelerator_handler); 169 base::RunLoop run_loop(&accelerator_handler);
170 UninstallView* view = new UninstallView(&result, 170 UninstallView* view = new UninstallView(&result,
171 run_loop.QuitClosure(), 171 run_loop.QuitClosure(),
172 show_delete_profile); 172 show_delete_profile);
173 views::Widget::CreateWindow(view)->Show(); 173 views::Widget::CreateWindow(view)->Show();
174 run_loop.Run(); 174 run_loop.Run();
175 return result; 175 return result;
176 } 176 }
177 177
178 } // namespace chrome 178 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_strip_unittest.cc ('k') | chrome/browser/ui/views/user_data_dir_dialog_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698