| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 ProfileWriter::ProfileWriter(Profile* profile) : profile_(profile) {} | 74 ProfileWriter::ProfileWriter(Profile* profile) : profile_(profile) {} |
| 75 | 75 |
| 76 bool ProfileWriter::BookmarkModelIsLoaded() const { | 76 bool ProfileWriter::BookmarkModelIsLoaded() const { |
| 77 return profile_->GetBookmarkModel()->IsLoaded(); | 77 return profile_->GetBookmarkModel()->IsLoaded(); |
| 78 } | 78 } |
| 79 | 79 |
| 80 bool ProfileWriter::TemplateURLServiceIsLoaded() const { | 80 bool ProfileWriter::TemplateURLServiceIsLoaded() const { |
| 81 return TemplateURLServiceFactory::GetForProfile(profile_)->loaded(); | 81 return TemplateURLServiceFactory::GetForProfile(profile_)->loaded(); |
| 82 } | 82 } |
| 83 | 83 |
| 84 void ProfileWriter::AddPasswordForm(const webkit_glue::PasswordForm& form) { | 84 void ProfileWriter::AddPasswordForm(const webkit::forms::PasswordForm& form) { |
| 85 profile_->GetPasswordStore(Profile::EXPLICIT_ACCESS)->AddLogin(form); | 85 profile_->GetPasswordStore(Profile::EXPLICIT_ACCESS)->AddLogin(form); |
| 86 } | 86 } |
| 87 | 87 |
| 88 #if defined(OS_WIN) | 88 #if defined(OS_WIN) |
| 89 void ProfileWriter::AddIE7PasswordInfo(const IE7PasswordInfo& info) { | 89 void ProfileWriter::AddIE7PasswordInfo(const IE7PasswordInfo& info) { |
| 90 profile_->GetWebDataService(Profile::EXPLICIT_ACCESS)->AddIE7Login(info); | 90 profile_->GetWebDataService(Profile::EXPLICIT_ACCESS)->AddIE7Login(info); |
| 91 } | 91 } |
| 92 #endif | 92 #endif |
| 93 | 93 |
| 94 void ProfileWriter::AddHistoryPage(const std::vector<history::URLRow>& page, | 94 void ProfileWriter::AddHistoryPage(const std::vector<history::URLRow>& page, |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 if (default_keyword && TemplateURL::SupportsReplacement(t_url)) | 327 if (default_keyword && TemplateURL::SupportsReplacement(t_url)) |
| 328 model->SetDefaultSearchProvider(t_url); | 328 model->SetDefaultSearchProvider(t_url); |
| 329 } else { | 329 } else { |
| 330 // Don't add invalid TemplateURLs to the model. | 330 // Don't add invalid TemplateURLs to the model. |
| 331 delete t_url; | 331 delete t_url; |
| 332 } | 332 } |
| 333 } | 333 } |
| 334 } | 334 } |
| 335 | 335 |
| 336 ProfileWriter::~ProfileWriter() {} | 336 ProfileWriter::~ProfileWriter() {} |
| OLD | NEW |