OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/password_manager/password_store_default.h" | 5 #include "chrome/browser/password_manager/password_store_default.h" |
6 | 6 |
7 #include "chrome/browser/chrome_thread.h" | 7 #include "chrome/browser/chrome_thread.h" |
8 #include "chrome/browser/password_manager/password_store_change.h" | 8 #include "chrome/browser/password_manager/password_store_change.h" |
9 #include "chrome/browser/pref_service.h" | 9 #include "chrome/browser/pref_service.h" |
10 #include "chrome/browser/webdata/web_data_service.h" | 10 #include "chrome/browser/webdata/web_data_service.h" |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 138 |
139 if (PASSWORD_RESULT != result->GetType()) { | 139 if (PASSWORD_RESULT != result->GetType()) { |
140 NOTREACHED(); | 140 NOTREACHED(); |
141 return; | 141 return; |
142 } | 142 } |
143 | 143 |
144 const PasswordForms& forms = | 144 const PasswordForms& forms = |
145 static_cast<const WDResult<PasswordForms>*>(result)->GetValue(); | 145 static_cast<const WDResult<PasswordForms>*>(result)->GetValue(); |
146 for (PasswordForms::const_iterator it = forms.begin(); | 146 for (PasswordForms::const_iterator it = forms.begin(); |
147 it != forms.end(); ++it) { | 147 it != forms.end(); ++it) { |
148 AddLoginImpl(**it); | 148 AddLogin(**it); |
149 web_data_service_->RemoveLogin(**it); | 149 web_data_service_->RemoveLogin(**it); |
150 delete *it; | 150 delete *it; |
151 } | 151 } |
152 if (handles_.empty()) { | 152 if (handles_.empty()) { |
153 profile_->GetPrefs()->RegisterBooleanPref(prefs::kLoginDatabaseMigrated, | 153 profile_->GetPrefs()->RegisterBooleanPref(prefs::kLoginDatabaseMigrated, |
154 true); | 154 true); |
155 } | 155 } |
156 } | 156 } |
OLD | NEW |