| 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 13 matching lines...) Expand all Loading... |
| 24 #include "chrome/browser/search_engines/template_url_service_factory.h" | 24 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 25 #include "chrome/common/importer/imported_bookmark_entry.h" | 25 #include "chrome/common/importer/imported_bookmark_entry.h" |
| 26 #include "chrome/common/importer/imported_favicon_usage.h" | 26 #include "chrome/common/importer/imported_favicon_usage.h" |
| 27 #include "chrome/common/pref_names.h" | 27 #include "chrome/common/pref_names.h" |
| 28 #include "components/bookmarks/browser/bookmark_model.h" | 28 #include "components/bookmarks/browser/bookmark_model.h" |
| 29 #include "components/password_manager/core/browser/password_store.h" | 29 #include "components/password_manager/core/browser/password_store.h" |
| 30 #include "components/search_engines/template_url.h" | 30 #include "components/search_engines/template_url.h" |
| 31 #include "components/search_engines/template_url_service.h" | 31 #include "components/search_engines/template_url_service.h" |
| 32 | 32 |
| 33 #if defined(OS_WIN) | 33 #if defined(OS_WIN) |
| 34 #include "chrome/browser/webdata/password_web_data_service_win.h" | |
| 35 #include "chrome/browser/webdata/web_data_service_factory.h" | 34 #include "chrome/browser/webdata/web_data_service_factory.h" |
| 35 #include "components/password_manager/core/browser/webdata/password_web_data_ser
vice_win.h" |
| 36 #endif | 36 #endif |
| 37 | 37 |
| 38 namespace { | 38 namespace { |
| 39 | 39 |
| 40 // Generates a unique folder name. If |folder_name| is not unique, then this | 40 // Generates a unique folder name. If |folder_name| is not unique, then this |
| 41 // repeatedly tests for '|folder_name| + (i)' until a unique name is found. | 41 // repeatedly tests for '|folder_name| + (i)' until a unique name is found. |
| 42 base::string16 GenerateUniqueFolderName(BookmarkModel* model, | 42 base::string16 GenerateUniqueFolderName(BookmarkModel* model, |
| 43 const base::string16& folder_name) { | 43 const base::string16& folder_name) { |
| 44 // Build a set containing the bookmark bar folder names. | 44 // Build a set containing the bookmark bar folder names. |
| 45 std::set<base::string16> existing_folder_names; | 45 std::set<base::string16> existing_folder_names; |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 | 323 |
| 324 // Only add valid TemplateURLs to the model. | 324 // Only add valid TemplateURLs to the model. |
| 325 if ((*i)->url_ref().IsValid(model->search_terms_data())) { | 325 if ((*i)->url_ref().IsValid(model->search_terms_data())) { |
| 326 model->Add(*i); // Takes ownership. | 326 model->Add(*i); // Takes ownership. |
| 327 *i = NULL; // Prevent the vector from deleting *i later. | 327 *i = NULL; // Prevent the vector from deleting *i later. |
| 328 } | 328 } |
| 329 } | 329 } |
| 330 } | 330 } |
| 331 | 331 |
| 332 ProfileWriter::~ProfileWriter() {} | 332 ProfileWriter::~ProfileWriter() {} |
| OLD | NEW |