| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 if (existing_folder_names.find(name) == existing_folder_names.end()) | 61 if (existing_folder_names.find(name) == existing_folder_names.end()) |
| 62 return name; | 62 return name; |
| 63 } | 63 } |
| 64 | 64 |
| 65 NOTREACHED(); | 65 NOTREACHED(); |
| 66 return folder_name; | 66 return folder_name; |
| 67 } | 67 } |
| 68 | 68 |
| 69 // Shows the bookmarks toolbar. | 69 // Shows the bookmarks toolbar. |
| 70 void ShowBookmarkBar(Profile* profile) { | 70 void ShowBookmarkBar(Profile* profile) { |
| 71 profile->GetPrefs()->SetBoolean(prefs::kShowBookmarkBar, true); | 71 profile->GetPrefs()->SetBoolean(bookmarks::prefs::kShowBookmarkBar, true); |
| 72 } | 72 } |
| 73 | 73 |
| 74 } // namespace | 74 } // namespace |
| 75 | 75 |
| 76 ProfileWriter::ProfileWriter(Profile* profile) : profile_(profile) {} | 76 ProfileWriter::ProfileWriter(Profile* profile) : profile_(profile) {} |
| 77 | 77 |
| 78 bool ProfileWriter::BookmarkModelIsLoaded() const { | 78 bool ProfileWriter::BookmarkModelIsLoaded() const { |
| 79 return BookmarkModelFactory::GetForProfile(profile_)->loaded(); | 79 return BookmarkModelFactory::GetForProfile(profile_)->loaded(); |
| 80 } | 80 } |
| 81 | 81 |
| (...skipping 241 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 |