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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 void ImporterHost::OnGoogleGAIACookieChecked(bool result) { | 161 void ImporterHost::OnGoogleGAIACookieChecked(bool result) { |
162 #if defined(OS_WIN) | 162 #if defined(OS_WIN) |
163 if (!result) { | 163 if (!result) { |
164 ui::MessageBox( | 164 ui::MessageBox( |
165 NULL, | 165 NULL, |
166 UTF16ToWide(l10n_util::GetStringUTF16( | 166 UTF16ToWide(l10n_util::GetStringUTF16( |
167 IDS_IMPORTER_GOOGLE_LOGIN_TEXT)).c_str(), | 167 IDS_IMPORTER_GOOGLE_LOGIN_TEXT)).c_str(), |
168 L"", | 168 L"", |
169 MB_OK | MB_TOPMOST); | 169 MB_OK | MB_TOPMOST); |
170 | 170 |
171 GURL url("https://www.google.com/accounts/ServiceLogin"); | 171 GURL url("https://accounts.google.com/ServiceLogin"); |
172 DCHECK(profile_); | 172 DCHECK(profile_); |
173 Browser* browser = BrowserList::GetLastActiveWithProfile(profile_); | 173 Browser* browser = BrowserList::GetLastActiveWithProfile(profile_); |
174 if (browser) | 174 if (browser) |
175 browser->AddSelectedTabWithURL(url, content::PAGE_TRANSITION_TYPED); | 175 browser->AddSelectedTabWithURL(url, content::PAGE_TRANSITION_TYPED); |
176 | 176 |
177 MessageLoop::current()->PostTask(FROM_HERE, base::Bind( | 177 MessageLoop::current()->PostTask(FROM_HERE, base::Bind( |
178 &ImporterHost::OnImportLockDialogEnd, this, false)); | 178 &ImporterHost::OnImportLockDialogEnd, this, false)); |
179 } else { | 179 } else { |
180 is_source_readable_ = true; | 180 is_source_readable_ = true; |
181 InvokeTaskIfDone(); | 181 InvokeTaskIfDone(); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 void ImporterHost::BookmarkModelChanged() { | 264 void ImporterHost::BookmarkModelChanged() { |
265 } | 265 } |
266 | 266 |
267 void ImporterHost::Observe(int type, | 267 void ImporterHost::Observe(int type, |
268 const content::NotificationSource& source, | 268 const content::NotificationSource& source, |
269 const content::NotificationDetails& details) { | 269 const content::NotificationDetails& details) { |
270 DCHECK(type == chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED); | 270 DCHECK(type == chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED); |
271 registrar_.RemoveAll(); | 271 registrar_.RemoveAll(); |
272 InvokeTaskIfDone(); | 272 InvokeTaskIfDone(); |
273 } | 273 } |
OLD | NEW |