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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 ProfileWriter::ProfileWriter(Profile* profile) : profile_(profile) {} | 72 ProfileWriter::ProfileWriter(Profile* profile) : profile_(profile) {} |
73 | 73 |
74 bool ProfileWriter::BookmarkModelIsLoaded() const { | 74 bool ProfileWriter::BookmarkModelIsLoaded() const { |
75 return BookmarkModelFactory::GetForProfile(profile_)->loaded(); | 75 return BookmarkModelFactory::GetForProfile(profile_)->loaded(); |
76 } | 76 } |
77 | 77 |
78 bool ProfileWriter::TemplateURLServiceIsLoaded() const { | 78 bool ProfileWriter::TemplateURLServiceIsLoaded() const { |
79 return TemplateURLServiceFactory::GetForProfile(profile_)->loaded(); | 79 return TemplateURLServiceFactory::GetForProfile(profile_)->loaded(); |
80 } | 80 } |
81 | 81 |
82 void ProfileWriter::AddPasswordForm(const content::PasswordForm& form) { | 82 void ProfileWriter::AddPasswordForm(const autofill::PasswordForm& form) { |
83 PasswordStoreFactory::GetForProfile( | 83 PasswordStoreFactory::GetForProfile( |
84 profile_, Profile::EXPLICIT_ACCESS)->AddLogin(form); | 84 profile_, Profile::EXPLICIT_ACCESS)->AddLogin(form); |
85 } | 85 } |
86 | 86 |
87 #if defined(OS_WIN) | 87 #if defined(OS_WIN) |
88 void ProfileWriter::AddIE7PasswordInfo(const IE7PasswordInfo& info) { | 88 void ProfileWriter::AddIE7PasswordInfo(const IE7PasswordInfo& info) { |
89 WebDataService::FromBrowserContext(profile_)->AddIE7Login(info); | 89 WebDataService::FromBrowserContext(profile_)->AddIE7Login(info); |
90 } | 90 } |
91 #endif | 91 #endif |
92 | 92 |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 | 310 |
311 // Only add valid TemplateURLs to the model. | 311 // Only add valid TemplateURLs to the model. |
312 if ((*i)->url_ref().IsValid()) { | 312 if ((*i)->url_ref().IsValid()) { |
313 model->AddAndSetProfile(*i, profile_); // Takes ownership. | 313 model->AddAndSetProfile(*i, profile_); // Takes ownership. |
314 *i = NULL; // Prevent the vector from deleting *i later. | 314 *i = NULL; // Prevent the vector from deleting *i later. |
315 } | 315 } |
316 } | 316 } |
317 } | 317 } |
318 | 318 |
319 ProfileWriter::~ProfileWriter() {} | 319 ProfileWriter::~ProfileWriter() {} |
OLD | NEW |