Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: chrome/browser/importer/in_process_importer_bridge.cc

Issue 23742004: Move PasswordForm from //content to //autofill. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_password_form_conversion_utils
Patch Set: Rebase Created 7 years, 3 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
OLDNEW
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/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/file_util.h" 8 #include "base/file_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/importer/external_process_importer_host.h" 10 #include "chrome/browser/importer/external_process_importer_host.h"
11 #include "chrome/browser/search_engines/template_url.h" 11 #include "chrome/browser/search_engines/template_url.h"
12 #include "chrome/browser/search_engines/template_url_parser.h" 12 #include "chrome/browser/search_engines/template_url_parser.h"
13 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" 13 #include "chrome/browser/search_engines/template_url_prepopulate_data.h"
14 #include "chrome/browser/search_engines/template_url_service.h" 14 #include "chrome/browser/search_engines/template_url_service.h"
15 #include "chrome/common/importer/imported_bookmark_entry.h" 15 #include "chrome/common/importer/imported_bookmark_entry.h"
16 #include "chrome/common/importer/imported_favicon_usage.h" 16 #include "chrome/common/importer/imported_favicon_usage.h"
17 #include "components/autofill/core/common/password_form.h"
17 #include "content/public/browser/browser_thread.h" 18 #include "content/public/browser/browser_thread.h"
18 #include "content/public/common/password_form.h"
19 #include "ui/base/l10n/l10n_util.h" 19 #include "ui/base/l10n/l10n_util.h"
20 20
21 #if defined(OS_WIN) 21 #if defined(OS_WIN)
22 #include "components/webdata/encryptor/ie7_password.h" 22 #include "components/webdata/encryptor/ie7_password.h"
23 #endif 23 #endif
24 24
25 #include <iterator> 25 #include <iterator>
26 26
27 namespace { 27 namespace {
28 28
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 ScopedVector<TemplateURL> owned_template_urls; 238 ScopedVector<TemplateURL> owned_template_urls;
239 std::copy(search_engines.begin(), search_engines.end(), 239 std::copy(search_engines.begin(), search_engines.end(),
240 std::back_inserter(owned_template_urls)); 240 std::back_inserter(owned_template_urls));
241 241
242 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, 242 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
243 base::Bind(&ProfileWriter::AddKeywords, writer_, 243 base::Bind(&ProfileWriter::AddKeywords, writer_,
244 base::Passed(&owned_template_urls), true)); 244 base::Passed(&owned_template_urls), true));
245 } 245 }
246 246
247 void InProcessImporterBridge::SetPasswordForm( 247 void InProcessImporterBridge::SetPasswordForm(
248 const content::PasswordForm& form) { 248 const autofill::PasswordForm& form) {
249 BrowserThread::PostTask( 249 BrowserThread::PostTask(
250 BrowserThread::UI, FROM_HERE, 250 BrowserThread::UI, FROM_HERE,
251 base::Bind(&ProfileWriter::AddPasswordForm, writer_, form)); 251 base::Bind(&ProfileWriter::AddPasswordForm, writer_, form));
252 } 252 }
253 253
254 void InProcessImporterBridge::NotifyStarted() { 254 void InProcessImporterBridge::NotifyStarted() {
255 BrowserThread::PostTask( 255 BrowserThread::PostTask(
256 BrowserThread::UI, FROM_HERE, 256 BrowserThread::UI, FROM_HERE,
257 base::Bind(&ExternalProcessImporterHost::NotifyImportStarted, host_)); 257 base::Bind(&ExternalProcessImporterHost::NotifyImportStarted, host_));
258 } 258 }
(...skipping 16 matching lines...) Expand all
275 BrowserThread::PostTask( 275 BrowserThread::PostTask(
276 BrowserThread::UI, FROM_HERE, 276 BrowserThread::UI, FROM_HERE,
277 base::Bind(&ExternalProcessImporterHost::NotifyImportEnded, host_)); 277 base::Bind(&ExternalProcessImporterHost::NotifyImportEnded, host_));
278 } 278 }
279 279
280 string16 InProcessImporterBridge::GetLocalizedString(int message_id) { 280 string16 InProcessImporterBridge::GetLocalizedString(int message_id) {
281 return l10n_util::GetStringUTF16(message_id); 281 return l10n_util::GetStringUTF16(message_id);
282 } 282 }
283 283
284 InProcessImporterBridge::~InProcessImporterBridge() {} 284 InProcessImporterBridge::~InProcessImporterBridge() {}
OLDNEW
« no previous file with comments | « chrome/browser/importer/in_process_importer_bridge.h ('k') | chrome/browser/importer/profile_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698