Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

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

Issue 12163003: Add FilePath to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/importer/mork_reader.h ('k') | chrome/browser/importer/nss_decryptor_mac.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/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 "base/base64.h" 10 #include "base/base64.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 // Version 3 has an extra line for further use. 225 // Version 3 has an extra line for further use.
226 if (version == 3) { 226 if (version == 3) {
227 ++begin; 227 ++begin;
228 } 228 }
229 229
230 forms->push_back(form); 230 forms->push_back(form);
231 } 231 }
232 } 232 }
233 } 233 }
234 234
235 bool NSSDecryptor::ReadAndParseSignons(const FilePath& sqlite_file, 235 bool NSSDecryptor::ReadAndParseSignons(const base::FilePath& sqlite_file,
236 std::vector<content::PasswordForm>* forms) { 236 std::vector<content::PasswordForm>* forms) {
237 sql::Connection db; 237 sql::Connection db;
238 if (!db.Open(sqlite_file)) 238 if (!db.Open(sqlite_file))
239 return false; 239 return false;
240 240
241 const char* query = "SELECT hostname FROM moz_disabledHosts"; 241 const char* query = "SELECT hostname FROM moz_disabledHosts";
242 sql::Statement s(db.GetUniqueStatement(query)); 242 sql::Statement s(db.GetUniqueStatement(query));
243 if (!s.is_valid()) 243 if (!s.is_valid())
244 return false; 244 return false;
245 245
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 // The user name, password and action. 290 // The user name, password and action.
291 form.username_element = s2.ColumnString16(3); 291 form.username_element = s2.ColumnString16(3);
292 form.username_value = Decrypt(s2.ColumnString(5)); 292 form.username_value = Decrypt(s2.ColumnString(5));
293 form.password_element = s2.ColumnString16(4); 293 form.password_element = s2.ColumnString16(4);
294 form.password_value = Decrypt(s2.ColumnString(6)); 294 form.password_value = Decrypt(s2.ColumnString(6));
295 form.action = GURL(s2.ColumnString(2)).ReplaceComponents(rep); 295 form.action = GURL(s2.ColumnString(2)).ReplaceComponents(rep);
296 forms->push_back(form); 296 forms->push_back(form);
297 } 297 }
298 return true; 298 return true;
299 } 299 }
OLDNEW
« no previous file with comments | « chrome/browser/importer/mork_reader.h ('k') | chrome/browser/importer/nss_decryptor_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698