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/in_process_importer_bridge.cc

Issue 6979007: Many fixes to bookmark importing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Happy tests =) Created 9 years, 7 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) 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/in_process_importer_bridge.h" 5 #include "chrome/browser/importer/in_process_importer_bridge.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/importer/importer_host.h" 8 #include "chrome/browser/importer/importer_host.h"
9 #include "content/browser/browser_thread.h" 9 #include "content/browser/browser_thread.h"
10 #include "ui/base/l10n/l10n_util.h" 10 #include "ui/base/l10n/l10n_util.h"
11 #include "webkit/glue/password_form.h" 11 #include "webkit/glue/password_form.h"
12 12
13 #if defined(OS_WIN) 13 #if defined(OS_WIN)
14 #include "chrome/browser/password_manager/ie7_password.h" 14 #include "chrome/browser/password_manager/ie7_password.h"
15 #endif 15 #endif
16 16
17 InProcessImporterBridge::InProcessImporterBridge(ProfileWriter* writer, 17 InProcessImporterBridge::InProcessImporterBridge(ProfileWriter* writer,
18 ImporterHost* host) 18 ImporterHost* host)
19 : writer_(writer), 19 : writer_(writer),
20 host_(host) { 20 host_(host) {
21 } 21 }
22 22
23 void InProcessImporterBridge::AddBookmarks( 23 void InProcessImporterBridge::AddBookmarks(
24 const std::vector<ProfileWriter::BookmarkEntry>& bookmarks, 24 const std::vector<ProfileWriter::BookmarkEntry>& bookmarks,
25 const string16& first_folder_name, 25 const string16& first_folder_name) {
26 int options) {
27 BrowserThread::PostTask( 26 BrowserThread::PostTask(
28 BrowserThread::UI, FROM_HERE, 27 BrowserThread::UI, FROM_HERE,
29 NewRunnableMethod(writer_, &ProfileWriter::AddBookmarks, bookmarks, 28 NewRunnableMethod(writer_, &ProfileWriter::AddBookmarks, bookmarks,
30 first_folder_name, options)); 29 first_folder_name));
31 } 30 }
32 31
33 void InProcessImporterBridge::AddHomePage(const GURL &home_page) { 32 void InProcessImporterBridge::AddHomePage(const GURL &home_page) {
34 BrowserThread::PostTask( 33 BrowserThread::PostTask(
35 BrowserThread::UI, FROM_HERE, 34 BrowserThread::UI, FROM_HERE,
36 NewRunnableMethod(writer_, &ProfileWriter::AddHomepage, home_page)); 35 NewRunnableMethod(writer_, &ProfileWriter::AddHomepage, home_page));
37 } 36 }
38 37
39 #if defined(OS_WIN) 38 #if defined(OS_WIN)
40 void InProcessImporterBridge::AddIE7PasswordInfo( 39 void InProcessImporterBridge::AddIE7PasswordInfo(
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 BrowserThread::PostTask( 102 BrowserThread::PostTask(
104 BrowserThread::UI, FROM_HERE, 103 BrowserThread::UI, FROM_HERE,
105 NewRunnableMethod(host_, &ImporterHost::NotifyImportEnded)); 104 NewRunnableMethod(host_, &ImporterHost::NotifyImportEnded));
106 } 105 }
107 106
108 string16 InProcessImporterBridge::GetLocalizedString(int message_id) { 107 string16 InProcessImporterBridge::GetLocalizedString(int message_id) {
109 return l10n_util::GetStringUTF16(message_id); 108 return l10n_util::GetStringUTF16(message_id);
110 } 109 }
111 110
112 InProcessImporterBridge::~InProcessImporterBridge() {} 111 InProcessImporterBridge::~InProcessImporterBridge() {}
OLDNEW
« no previous file with comments | « chrome/browser/importer/in_process_importer_bridge.h ('k') | chrome/browser/importer/profile_import_process_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698