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 <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "components/password_manager/core/browser/password_store.h" | 31 #include "components/password_manager/core/browser/password_store.h" |
32 #include "components/search_engines/template_url.h" | 32 #include "components/search_engines/template_url.h" |
33 #include "components/search_engines/template_url_service.h" | 33 #include "components/search_engines/template_url_service.h" |
34 | 34 |
35 #if defined(OS_WIN) | 35 #if defined(OS_WIN) |
36 #include "chrome/browser/webdata/web_data_service_factory.h" | 36 #include "chrome/browser/webdata/web_data_service_factory.h" |
37 #include "components/password_manager/core/browser/webdata/password_web_data_ser
vice_win.h" | 37 #include "components/password_manager/core/browser/webdata/password_web_data_ser
vice_win.h" |
38 #endif | 38 #endif |
39 | 39 |
40 using bookmarks::BookmarkModel; | 40 using bookmarks::BookmarkModel; |
| 41 using bookmarks::BookmarkNode; |
41 | 42 |
42 namespace { | 43 namespace { |
43 | 44 |
44 // Generates a unique folder name. If |folder_name| is not unique, then this | 45 // Generates a unique folder name. If |folder_name| is not unique, then this |
45 // repeatedly tests for '|folder_name| + (i)' until a unique name is found. | 46 // repeatedly tests for '|folder_name| + (i)' until a unique name is found. |
46 base::string16 GenerateUniqueFolderName(BookmarkModel* model, | 47 base::string16 GenerateUniqueFolderName(BookmarkModel* model, |
47 const base::string16& folder_name) { | 48 const base::string16& folder_name) { |
48 // Build a set containing the bookmark bar folder names. | 49 // Build a set containing the bookmark bar folder names. |
49 std::set<base::string16> existing_folder_names; | 50 std::set<base::string16> existing_folder_names; |
50 const BookmarkNode* bookmark_bar = model->bookmark_bar_node(); | 51 const BookmarkNode* bookmark_bar = model->bookmark_bar_node(); |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 void ProfileWriter::AddAutofillFormDataEntries( | 339 void ProfileWriter::AddAutofillFormDataEntries( |
339 const std::vector<autofill::AutofillEntry>& autofill_entries) { | 340 const std::vector<autofill::AutofillEntry>& autofill_entries) { |
340 scoped_refptr<autofill::AutofillWebDataService> web_data_service = | 341 scoped_refptr<autofill::AutofillWebDataService> web_data_service = |
341 WebDataServiceFactory::GetAutofillWebDataForProfile( | 342 WebDataServiceFactory::GetAutofillWebDataForProfile( |
342 profile_, ServiceAccessType::EXPLICIT_ACCESS); | 343 profile_, ServiceAccessType::EXPLICIT_ACCESS); |
343 if (web_data_service.get()) | 344 if (web_data_service.get()) |
344 web_data_service->UpdateAutofillEntries(autofill_entries); | 345 web_data_service->UpdateAutofillEntries(autofill_entries); |
345 } | 346 } |
346 | 347 |
347 ProfileWriter::~ProfileWriter() {} | 348 ProfileWriter::~ProfileWriter() {} |
OLD | NEW |