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

Side by Side Diff: chrome/browser/importer/importer_host.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 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/importer/importer_host.h" 5 #include "chrome/browser/importer/importer_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 NULL, 172 NULL,
173 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), 173 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME),
174 l10n_util::GetStringUTF16(IDS_IMPORTER_GOOGLE_LOGIN_TEXT), 174 l10n_util::GetStringUTF16(IDS_IMPORTER_GOOGLE_LOGIN_TEXT),
175 chrome::MESSAGE_BOX_TYPE_INFORMATION); 175 chrome::MESSAGE_BOX_TYPE_INFORMATION);
176 176
177 GURL url("https://accounts.google.com/ServiceLogin"); 177 GURL url("https://accounts.google.com/ServiceLogin");
178 if (browser_) 178 if (browser_)
179 chrome::AddSelectedTabWithURL(browser_, url, 179 chrome::AddSelectedTabWithURL(browser_, url,
180 content::PAGE_TRANSITION_TYPED); 180 content::PAGE_TRANSITION_TYPED);
181 181
182 MessageLoop::current()->PostTask(FROM_HERE, base::Bind( 182 base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(
183 &ImporterHost::OnImportLockDialogEnd, 183 &ImporterHost::OnImportLockDialogEnd,
184 weak_ptr_factory_.GetWeakPtr(), false)); 184 weak_ptr_factory_.GetWeakPtr(), false));
185 } else { 185 } else {
186 is_source_readable_ = true; 186 is_source_readable_ = true;
187 InvokeTaskIfDone(); 187 InvokeTaskIfDone();
188 } 188 }
189 #endif 189 #endif
190 } 190 }
191 191
192 ImporterHost::~ImporterHost() { 192 ImporterHost::~ImporterHost() {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 const content::NotificationDetails& details) { 273 const content::NotificationDetails& details) {
274 DCHECK(type == chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED); 274 DCHECK(type == chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED);
275 registrar_.RemoveAll(); 275 registrar_.RemoveAll();
276 InvokeTaskIfDone(); 276 InvokeTaskIfDone();
277 } 277 }
278 278
279 void ImporterHost::OnBrowserRemoved(Browser* browser) { 279 void ImporterHost::OnBrowserRemoved(Browser* browser) {
280 if (browser_ == browser) 280 if (browser_ == browser)
281 browser_ = NULL; 281 browser_ = NULL;
282 } 282 }
OLDNEW
« no previous file with comments | « chrome/browser/importer/ie_importer_browsertest_win.cc ('k') | chrome/browser/importer/toolbar_importer_utils_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698