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/nss_decryptor.h" | 5 #include "chrome/browser/importer/nss_decryptor.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "app/sql/connection.h" | |
11 #include "app/sql/statement.h" | |
12 #include "base/base64.h" | 10 #include "base/base64.h" |
13 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
14 #include "base/string_split.h" | 12 #include "base/string_split.h" |
15 #include "base/string_util.h" | 13 #include "base/string_util.h" |
16 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
| 15 #include "sql/connection.h" |
| 16 #include "sql/statement.h" |
17 #include "webkit/glue/password_form.h" | 17 #include "webkit/glue/password_form.h" |
18 | 18 |
19 #if defined(USE_NSS) | 19 #if defined(USE_NSS) |
20 #include <pk11pub.h> | 20 #include <pk11pub.h> |
21 #include <pk11sdr.h> | 21 #include <pk11sdr.h> |
22 #endif // defined(USE_NSS) | 22 #endif // defined(USE_NSS) |
23 | 23 |
24 // This method is based on some Firefox code in | 24 // This method is based on some Firefox code in |
25 // security/manager/ssl/src/nsSDR.cpp | 25 // security/manager/ssl/src/nsSDR.cpp |
26 // The license block is: | 26 // The license block is: |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 // The user name, password and action. | 289 // The user name, password and action. |
290 form.username_element = s2.ColumnString16(3); | 290 form.username_element = s2.ColumnString16(3); |
291 form.username_value = Decrypt(s2.ColumnString(5)); | 291 form.username_value = Decrypt(s2.ColumnString(5)); |
292 form.password_element = s2.ColumnString16(4); | 292 form.password_element = s2.ColumnString16(4); |
293 form.password_value = Decrypt(s2.ColumnString(6)); | 293 form.password_value = Decrypt(s2.ColumnString(6)); |
294 form.action = GURL(s2.ColumnString(2)).ReplaceComponents(rep); | 294 form.action = GURL(s2.ColumnString(2)).ReplaceComponents(rep); |
295 forms->push_back(form); | 295 forms->push_back(form); |
296 } | 296 } |
297 return true; | 297 return true; |
298 } | 298 } |
OLD | NEW |