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 "base/string_util.h" | 5 #include "base/string_util.h" |
6 #include "base/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
7 #include "chrome/browser/password_manager/password_form_data.h" | 7 #include "chrome/browser/password_manager/password_form_data.h" |
8 | 8 |
9 using content::PasswordForm; | 9 using content::PasswordForm; |
10 | 10 |
11 PasswordForm* CreatePasswordFormFromData( | 11 PasswordForm* CreatePasswordFormFromData( |
12 const PasswordFormData& form_data) { | 12 const PasswordFormData& form_data) { |
13 PasswordForm* form = new PasswordForm(); | 13 PasswordForm* form = new PasswordForm(); |
14 form->scheme = form_data.scheme; | 14 form->scheme = form_data.scheme; |
15 form->preferred = form_data.preferred; | 15 form->preferred = form_data.preferred; |
16 form->ssl_valid = form_data.ssl_valid; | 16 form->ssl_valid = form_data.ssl_valid; |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 std::vector<PasswordForm*> first_ptr; | 110 std::vector<PasswordForm*> first_ptr; |
111 for (unsigned int i = 0; i < first.size(); ++i) { | 111 for (unsigned int i = 0; i < first.size(); ++i) { |
112 first_ptr.push_back(&first[i]); | 112 first_ptr.push_back(&first[i]); |
113 } | 113 } |
114 std::vector<PasswordForm*> second_ptr; | 114 std::vector<PasswordForm*> second_ptr; |
115 for (unsigned int i = 0; i < second.size(); ++i) { | 115 for (unsigned int i = 0; i < second.size(); ++i) { |
116 second_ptr.push_back(&second[i]); | 116 second_ptr.push_back(&second[i]); |
117 } | 117 } |
118 return ContainsSamePasswordFormsPtr(first_ptr, second_ptr); | 118 return ContainsSamePasswordFormsPtr(first_ptr, second_ptr); |
119 } | 119 } |
OLD | NEW |