| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "base/scoped_ptr.h" | 7 #include "base/scoped_ptr.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "chrome/common/sqlite_utils.h" | 9 #include "chrome/common/sqlite_utils.h" |
| 10 | 10 |
| 11 #if defined(OS_LINUX) | 11 #if defined(OS_LINUX) |
| 12 #include <pk11pub.h> | 12 #include <pk11pub.h> |
| 13 #include <pk11sdr.h> | 13 #include <pk11sdr.h> |
| 14 #endif // defined(OS_LINUX) | 14 #endif // defined(OS_LINUX) |
| 15 | 15 |
| 16 #include "base/base64.h" | 16 #include "base/base64.h" |
| 17 #include "base/string_util.h" | 17 #include "base/utf_string_conversions.h" |
| 18 #include "webkit/glue/password_form.h" | 18 #include "webkit/glue/password_form.h" |
| 19 | 19 |
| 20 using webkit_glue::PasswordForm; | 20 using webkit_glue::PasswordForm; |
| 21 | 21 |
| 22 // This method is based on some Firefox code in | 22 // This method is based on some Firefox code in |
| 23 // security/manager/ssl/src/nsSDR.cpp | 23 // security/manager/ssl/src/nsSDR.cpp |
| 24 // The license block is: | 24 // The license block is: |
| 25 | 25 |
| 26 /* ***** BEGIN LICENSE BLOCK ***** | 26 /* ***** BEGIN LICENSE BLOCK ***** |
| 27 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 27 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 // The user name, password and action. | 288 // The user name, password and action. |
| 289 form.username_element = UTF8ToUTF16(s2.column_string(3)); | 289 form.username_element = UTF8ToUTF16(s2.column_string(3)); |
| 290 form.username_value = Decrypt(s2.column_string(5)); | 290 form.username_value = Decrypt(s2.column_string(5)); |
| 291 form.password_element = UTF8ToUTF16(s2.column_string(4)); | 291 form.password_element = UTF8ToUTF16(s2.column_string(4)); |
| 292 form.password_value = Decrypt(s2.column_string(6)); | 292 form.password_value = Decrypt(s2.column_string(6)); |
| 293 form.action = GURL(s2.column_string(2)).ReplaceComponents(rep); | 293 form.action = GURL(s2.column_string(2)).ReplaceComponents(rep); |
| 294 forms->push_back(form); | 294 forms->push_back(form); |
| 295 } | 295 } |
| 296 return true; | 296 return true; |
| 297 } | 297 } |
| OLD | NEW |