| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/bookmarks/bookmark_model.h" | 9 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 if (!result) { | 161 if (!result) { |
| 162 ui::MessageBox( | 162 ui::MessageBox( |
| 163 NULL, | 163 NULL, |
| 164 UTF16ToWide(l10n_util::GetStringUTF16( | 164 UTF16ToWide(l10n_util::GetStringUTF16( |
| 165 IDS_IMPORTER_GOOGLE_LOGIN_TEXT)).c_str(), | 165 IDS_IMPORTER_GOOGLE_LOGIN_TEXT)).c_str(), |
| 166 L"", | 166 L"", |
| 167 MB_OK | MB_TOPMOST); | 167 MB_OK | MB_TOPMOST); |
| 168 | 168 |
| 169 GURL url("https://www.google.com/accounts/ServiceLogin"); | 169 GURL url("https://www.google.com/accounts/ServiceLogin"); |
| 170 BrowserList::GetLastActive()->AddSelectedTabWithURL( | 170 BrowserList::GetLastActive()->AddSelectedTabWithURL( |
| 171 url, PageTransition::TYPED); | 171 url, content::PAGE_TRANSITION_TYPED); |
| 172 | 172 |
| 173 MessageLoop::current()->PostTask(FROM_HERE, base::Bind( | 173 MessageLoop::current()->PostTask(FROM_HERE, base::Bind( |
| 174 &ImporterHost::OnImportLockDialogEnd, this, false)); | 174 &ImporterHost::OnImportLockDialogEnd, this, false)); |
| 175 } else { | 175 } else { |
| 176 is_source_readable_ = true; | 176 is_source_readable_ = true; |
| 177 InvokeTaskIfDone(); | 177 InvokeTaskIfDone(); |
| 178 } | 178 } |
| 179 #endif | 179 #endif |
| 180 } | 180 } |
| 181 | 181 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 void ImporterHost::BookmarkModelChanged() { | 260 void ImporterHost::BookmarkModelChanged() { |
| 261 } | 261 } |
| 262 | 262 |
| 263 void ImporterHost::Observe(int type, | 263 void ImporterHost::Observe(int type, |
| 264 const NotificationSource& source, | 264 const NotificationSource& source, |
| 265 const NotificationDetails& details) { | 265 const NotificationDetails& details) { |
| 266 DCHECK(type == chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED); | 266 DCHECK(type == chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED); |
| 267 registrar_.RemoveAll(); | 267 registrar_.RemoveAll(); |
| 268 InvokeTaskIfDone(); | 268 InvokeTaskIfDone(); |
| 269 } | 269 } |
| OLD | NEW |