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/in_process_importer_bridge.h" | 5 #include "chrome/browser/importer/in_process_importer_bridge.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/importer/importer_host.h" | 9 #include "chrome/browser/importer/importer_host.h" |
10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
11 #include "ui/base/l10n/l10n_util.h" | 11 #include "ui/base/l10n/l10n_util.h" |
12 #include "webkit/glue/password_form.h" | 12 #include "webkit/forms/password_form.h" |
13 | 13 |
14 #if defined(OS_WIN) | 14 #if defined(OS_WIN) |
15 #include "chrome/browser/password_manager/ie7_password.h" | 15 #include "chrome/browser/password_manager/ie7_password.h" |
16 #endif | 16 #endif |
17 | 17 |
18 using content::BrowserThread; | 18 using content::BrowserThread; |
19 | 19 |
20 InProcessImporterBridge::InProcessImporterBridge(ProfileWriter* writer, | 20 InProcessImporterBridge::InProcessImporterBridge(ProfileWriter* writer, |
21 ImporterHost* host) | 21 ImporterHost* host) |
22 : writer_(writer), | 22 : writer_(writer), |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 int default_keyword_index, | 67 int default_keyword_index, |
68 bool unique_on_host_and_path) { | 68 bool unique_on_host_and_path) { |
69 BrowserThread::PostTask( | 69 BrowserThread::PostTask( |
70 BrowserThread::UI, FROM_HERE, | 70 BrowserThread::UI, FROM_HERE, |
71 base::Bind( | 71 base::Bind( |
72 &ProfileWriter::AddKeywords, writer_, template_urls, | 72 &ProfileWriter::AddKeywords, writer_, template_urls, |
73 default_keyword_index, unique_on_host_and_path)); | 73 default_keyword_index, unique_on_host_and_path)); |
74 } | 74 } |
75 | 75 |
76 void InProcessImporterBridge::SetPasswordForm( | 76 void InProcessImporterBridge::SetPasswordForm( |
77 const webkit_glue::PasswordForm& form) { | 77 const webkit::forms::PasswordForm& form) { |
78 BrowserThread::PostTask( | 78 BrowserThread::PostTask( |
79 BrowserThread::UI, FROM_HERE, | 79 BrowserThread::UI, FROM_HERE, |
80 base::Bind(&ProfileWriter::AddPasswordForm, writer_, form)); | 80 base::Bind(&ProfileWriter::AddPasswordForm, writer_, form)); |
81 } | 81 } |
82 | 82 |
83 void InProcessImporterBridge::NotifyStarted() { | 83 void InProcessImporterBridge::NotifyStarted() { |
84 BrowserThread::PostTask( | 84 BrowserThread::PostTask( |
85 BrowserThread::UI, FROM_HERE, | 85 BrowserThread::UI, FROM_HERE, |
86 base::Bind(&ImporterHost::NotifyImportStarted, host_)); | 86 base::Bind(&ImporterHost::NotifyImportStarted, host_)); |
87 } | 87 } |
(...skipping 14 matching lines...) Expand all Loading... |
102 BrowserThread::PostTask( | 102 BrowserThread::PostTask( |
103 BrowserThread::UI, FROM_HERE, | 103 BrowserThread::UI, FROM_HERE, |
104 base::Bind(&ImporterHost::NotifyImportEnded, host_)); | 104 base::Bind(&ImporterHost::NotifyImportEnded, host_)); |
105 } | 105 } |
106 | 106 |
107 string16 InProcessImporterBridge::GetLocalizedString(int message_id) { | 107 string16 InProcessImporterBridge::GetLocalizedString(int message_id) { |
108 return l10n_util::GetStringUTF16(message_id); | 108 return l10n_util::GetStringUTF16(message_id); |
109 } | 109 } |
110 | 110 |
111 InProcessImporterBridge::~InProcessImporterBridge() {} | 111 InProcessImporterBridge::~InProcessImporterBridge() {} |
OLD | NEW |