Chromium Code Reviews

Side by Side Diff: chrome/utility/importer/nss_decryptor.cc

Issue 306123004: NSSDecryptor::ReadAndParseSignons() - improved password form scheme detection, (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « no previous file | components/autofill/content/common/autofill_param_traits_macros.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/utility/importer/nss_decryptor.h" 5 #include "chrome/utility/importer/nss_decryptor.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 266 matching lines...)
277 } else { 277 } else {
278 url = GURL(s2.ColumnString(0)); 278 url = GURL(s2.ColumnString(0));
279 } 279 }
280 // Skip this row if the URL is not valid. 280 // Skip this row if the URL is not valid.
281 if (!url.is_valid()) 281 if (!url.is_valid())
282 continue; 282 continue;
283 283
284 autofill::PasswordForm form; 284 autofill::PasswordForm form;
285 form.origin = url.ReplaceComponents(rep); 285 form.origin = url.ReplaceComponents(rep);
286 form.signon_realm = form.origin.GetOrigin().spec(); 286 form.signon_realm = form.origin.GetOrigin().spec();
287 if (!realm.empty()) 287 if (!realm.empty()) {
288 form.signon_realm += realm; 288 form.signon_realm += realm;
289 // TODO(ljagielski) this isn't perfect, find out how to
Ilya Sherman 2014/05/30 23:17:54 nit: "TODO(ljagielski)" -> "TODO(ljagielski):"
290 // identify scheme digest
Ilya Sherman 2014/05/30 23:17:54 This TODO is a bit vague on what the problem is.
291 form.scheme = autofill::PasswordForm::SCHEME_BASIC;
292 }
289 form.ssl_valid = form.origin.SchemeIsSecure(); 293 form.ssl_valid = form.origin.SchemeIsSecure();
290 // The user name, password and action. 294 // The user name, password and action.
291 form.username_element = s2.ColumnString16(3); 295 form.username_element = s2.ColumnString16(3);
292 form.username_value = Decrypt(s2.ColumnString(5)); 296 form.username_value = Decrypt(s2.ColumnString(5));
293 form.password_element = s2.ColumnString16(4); 297 form.password_element = s2.ColumnString16(4);
294 form.password_value = Decrypt(s2.ColumnString(6)); 298 form.password_value = Decrypt(s2.ColumnString(6));
295 form.action = GURL(s2.ColumnString(2)).ReplaceComponents(rep); 299 form.action = GURL(s2.ColumnString(2)).ReplaceComponents(rep);
296 forms->push_back(form); 300 forms->push_back(form);
297 } 301 }
298 return true; 302 return true;
299 } 303 }
OLDNEW
« no previous file with comments | « no previous file | components/autofill/content/common/autofill_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine