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.h" | 5 #include "chrome/browser/importer/importer.h" |
6 | 6 |
7 #include "base/threading/thread.h" | 7 #include "base/threading/thread.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/bookmarks/bookmark_model.h" | 10 #include "chrome/browser/bookmarks/bookmark_model.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "chrome/common/notification_source.h" | 23 #include "chrome/common/notification_source.h" |
24 #include "gfx/codec/png_codec.h" | 24 #include "gfx/codec/png_codec.h" |
25 #include "gfx/favicon_size.h" | 25 #include "gfx/favicon_size.h" |
26 #include "grit/generated_resources.h" | 26 #include "grit/generated_resources.h" |
27 #include "skia/ext/image_operations.h" | 27 #include "skia/ext/image_operations.h" |
28 #include "ui/base/l10n/l10n_util.h" | 28 #include "ui/base/l10n/l10n_util.h" |
29 #include "webkit/glue/image_decoder.h" | 29 #include "webkit/glue/image_decoder.h" |
30 | 30 |
31 // TODO(port): Port these files. | 31 // TODO(port): Port these files. |
32 #if defined(OS_WIN) | 32 #if defined(OS_WIN) |
33 #include "app/win/win_util.h" | |
34 #include "chrome/browser/ui/views/importer_lock_view.h" | 33 #include "chrome/browser/ui/views/importer_lock_view.h" |
| 34 #include "ui/base/message_box_win.h" |
35 #include "views/window/window.h" | 35 #include "views/window/window.h" |
36 #elif defined(OS_MACOSX) | 36 #elif defined(OS_MACOSX) |
37 #include "chrome/browser/ui/cocoa/importer/importer_lock_dialog.h" | 37 #include "chrome/browser/ui/cocoa/importer/importer_lock_dialog.h" |
38 #elif defined(TOOLKIT_USES_GTK) | 38 #elif defined(TOOLKIT_USES_GTK) |
39 #include "chrome/browser/ui/gtk/import_lock_dialog_gtk.h" | 39 #include "chrome/browser/ui/gtk/import_lock_dialog_gtk.h" |
40 #endif | 40 #endif |
41 | 41 |
42 using webkit_glue::PasswordForm; | 42 using webkit_glue::PasswordForm; |
43 | 43 |
44 // Importer. | 44 // Importer. |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 task_ = NewRunnableMethod(importer_, &Importer::StartImport, | 190 task_ = NewRunnableMethod(importer_, &Importer::StartImport, |
191 profile_info, items, bridge); | 191 profile_info, items, bridge); |
192 | 192 |
193 CheckForFirefoxLock(profile_info, items, first_run); | 193 CheckForFirefoxLock(profile_info, items, first_run); |
194 | 194 |
195 #if defined(OS_WIN) | 195 #if defined(OS_WIN) |
196 // For google toolbar import, we need the user to log in and store their GAIA | 196 // For google toolbar import, we need the user to log in and store their GAIA |
197 // credentials. | 197 // credentials. |
198 if (profile_info.browser_type == importer::GOOGLE_TOOLBAR5) { | 198 if (profile_info.browser_type == importer::GOOGLE_TOOLBAR5) { |
199 if (!toolbar_importer_utils::IsGoogleGAIACookieInstalled()) { | 199 if (!toolbar_importer_utils::IsGoogleGAIACookieInstalled()) { |
200 app::win::MessageBox( | 200 ui::MessageBox( |
201 NULL, | 201 NULL, |
202 UTF16ToWide(l10n_util::GetStringUTF16( | 202 UTF16ToWide(l10n_util::GetStringUTF16( |
203 IDS_IMPORTER_GOOGLE_LOGIN_TEXT)).c_str(), | 203 IDS_IMPORTER_GOOGLE_LOGIN_TEXT)).c_str(), |
204 L"", | 204 L"", |
205 MB_OK | MB_TOPMOST); | 205 MB_OK | MB_TOPMOST); |
206 | 206 |
207 GURL url("https://www.google.com/accounts/ServiceLogin"); | 207 GURL url("https://www.google.com/accounts/ServiceLogin"); |
208 BrowserList::GetLastActive()->AddSelectedTabWithURL( | 208 BrowserList::GetLastActive()->AddSelectedTabWithURL( |
209 url, PageTransition::TYPED); | 209 url, PageTransition::TYPED); |
210 | 210 |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 template_url_vec.reserve(template_urls.size()); | 587 template_url_vec.reserve(template_urls.size()); |
588 std::vector<TemplateURL>::const_iterator iter; | 588 std::vector<TemplateURL>::const_iterator iter; |
589 for (iter = template_urls.begin(); | 589 for (iter = template_urls.begin(); |
590 iter != template_urls.end(); | 590 iter != template_urls.end(); |
591 ++iter) { | 591 ++iter) { |
592 template_url_vec.push_back(new TemplateURL(*iter)); | 592 template_url_vec.push_back(new TemplateURL(*iter)); |
593 } | 593 } |
594 bridge_->SetKeywords(template_url_vec, default_keyword_index, | 594 bridge_->SetKeywords(template_url_vec, default_keyword_index, |
595 unique_on_host_and_path); | 595 unique_on_host_and_path); |
596 } | 596 } |
OLD | NEW |