| 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/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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 #endif | 151 #endif |
| 152 | 152 |
| 153 CheckForLoadedModels(items); | 153 CheckForLoadedModels(items); |
| 154 AddRef(); | 154 AddRef(); |
| 155 InvokeTaskIfDone(); | 155 InvokeTaskIfDone(); |
| 156 } | 156 } |
| 157 | 157 |
| 158 void ImporterHost::OnGoogleGAIACookieChecked(bool result) { | 158 void ImporterHost::OnGoogleGAIACookieChecked(bool result) { |
| 159 #if defined(OS_WIN) | 159 #if defined(OS_WIN) |
| 160 if (!result) { | 160 if (!result) { |
| 161 browser::ShowMessageBox(NULL, | 161 chrome::ShowMessageBox(NULL, |
| 162 l10n_util::GetStringUTF16(IDS_IMPORTER_GOOGLE_LOGIN_TEXT), string16(), | 162 l10n_util::GetStringUTF16(IDS_IMPORTER_GOOGLE_LOGIN_TEXT), string16(), |
| 163 browser::MESSAGE_BOX_TYPE_INFORMATION); | 163 chrome::MESSAGE_BOX_TYPE_INFORMATION); |
| 164 | 164 |
| 165 GURL url("https://accounts.google.com/ServiceLogin"); | 165 GURL url("https://accounts.google.com/ServiceLogin"); |
| 166 DCHECK(profile_); | 166 DCHECK(profile_); |
| 167 Browser* browser = browser::FindLastActiveWithProfile(profile_); | 167 Browser* browser = browser::FindLastActiveWithProfile(profile_); |
| 168 if (browser) | 168 if (browser) |
| 169 chrome::AddSelectedTabWithURL(browser, url, | 169 chrome::AddSelectedTabWithURL(browser, url, |
| 170 content::PAGE_TRANSITION_TYPED); | 170 content::PAGE_TRANSITION_TYPED); |
| 171 | 171 |
| 172 MessageLoop::current()->PostTask(FROM_HERE, base::Bind( | 172 MessageLoop::current()->PostTask(FROM_HERE, base::Bind( |
| 173 &ImporterHost::OnImportLockDialogEnd, this, false)); | 173 &ImporterHost::OnImportLockDialogEnd, this, false)); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 void ImporterHost::BookmarkModelChanged() { | 259 void ImporterHost::BookmarkModelChanged() { |
| 260 } | 260 } |
| 261 | 261 |
| 262 void ImporterHost::Observe(int type, | 262 void ImporterHost::Observe(int type, |
| 263 const content::NotificationSource& source, | 263 const content::NotificationSource& source, |
| 264 const content::NotificationDetails& details) { | 264 const content::NotificationDetails& details) { |
| 265 DCHECK(type == chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED); | 265 DCHECK(type == chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED); |
| 266 registrar_.RemoveAll(); | 266 registrar_.RemoveAll(); |
| 267 InvokeTaskIfDone(); | 267 InvokeTaskIfDone(); |
| 268 } | 268 } |
| OLD | NEW |