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/profile_writer.h" | 5 #include "chrome/browser/importer/profile_writer.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/prefs/pref_service.h" | |
14 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
15 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
16 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
17 #include "base/threading/thread.h" | 16 #include "base/threading/thread.h" |
18 #include "build/build_config.h" | 17 #include "build/build_config.h" |
19 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 18 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
20 #include "chrome/browser/chrome_notification_types.h" | 19 #include "chrome/browser/chrome_notification_types.h" |
21 #include "chrome/browser/favicon/favicon_service_factory.h" | 20 #include "chrome/browser/favicon/favicon_service_factory.h" |
22 #include "chrome/browser/history/history_service_factory.h" | 21 #include "chrome/browser/history/history_service_factory.h" |
23 #include "chrome/browser/password_manager/password_store_factory.h" | 22 #include "chrome/browser/password_manager/password_store_factory.h" |
24 #include "chrome/browser/profiles/profile.h" | 23 #include "chrome/browser/profiles/profile.h" |
25 #include "chrome/browser/search_engines/template_url_service_factory.h" | 24 #include "chrome/browser/search_engines/template_url_service_factory.h" |
26 #include "chrome/browser/web_data_service_factory.h" | 25 #include "chrome/browser/web_data_service_factory.h" |
27 #include "chrome/common/importer/imported_bookmark_entry.h" | 26 #include "chrome/common/importer/imported_bookmark_entry.h" |
28 #include "chrome/common/pref_names.h" | 27 #include "chrome/common/pref_names.h" |
29 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" | 28 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" |
30 #include "components/bookmarks/browser/bookmark_model.h" | 29 #include "components/bookmarks/browser/bookmark_model.h" |
31 #include "components/bookmarks/common/bookmark_pref_names.h" | 30 #include "components/bookmarks/common/bookmark_pref_names.h" |
32 #include "components/favicon/core/favicon_service.h" | 31 #include "components/favicon/core/favicon_service.h" |
33 #include "components/history/core/browser/history_service.h" | 32 #include "components/history/core/browser/history_service.h" |
34 #include "components/password_manager/core/browser/password_store.h" | 33 #include "components/password_manager/core/browser/password_store.h" |
| 34 #include "components/prefs/pref_service.h" |
35 #include "components/search_engines/template_url.h" | 35 #include "components/search_engines/template_url.h" |
36 #include "components/search_engines/template_url_service.h" | 36 #include "components/search_engines/template_url_service.h" |
37 | 37 |
38 #if defined(OS_WIN) | 38 #if defined(OS_WIN) |
39 #include "chrome/browser/web_data_service_factory.h" | 39 #include "chrome/browser/web_data_service_factory.h" |
40 #include "components/password_manager/core/browser/webdata/password_web_data_ser
vice_win.h" | 40 #include "components/password_manager/core/browser/webdata/password_web_data_ser
vice_win.h" |
41 #endif | 41 #endif |
42 | 42 |
43 using bookmarks::BookmarkModel; | 43 using bookmarks::BookmarkModel; |
44 using bookmarks::BookmarkNode; | 44 using bookmarks::BookmarkNode; |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 void ProfileWriter::AddAutofillFormDataEntries( | 342 void ProfileWriter::AddAutofillFormDataEntries( |
343 const std::vector<autofill::AutofillEntry>& autofill_entries) { | 343 const std::vector<autofill::AutofillEntry>& autofill_entries) { |
344 scoped_refptr<autofill::AutofillWebDataService> web_data_service = | 344 scoped_refptr<autofill::AutofillWebDataService> web_data_service = |
345 WebDataServiceFactory::GetAutofillWebDataForProfile( | 345 WebDataServiceFactory::GetAutofillWebDataForProfile( |
346 profile_, ServiceAccessType::EXPLICIT_ACCESS); | 346 profile_, ServiceAccessType::EXPLICIT_ACCESS); |
347 if (web_data_service.get()) | 347 if (web_data_service.get()) |
348 web_data_service->UpdateAutofillEntries(autofill_entries); | 348 web_data_service->UpdateAutofillEntries(autofill_entries); |
349 } | 349 } |
350 | 350 |
351 ProfileWriter::~ProfileWriter() {} | 351 ProfileWriter::~ProfileWriter() {} |
OLD | NEW |