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

Side by Side Diff: chrome/browser/webdata/logins_table_win.cc

Issue 7353026: Move app/sql/* files to sql/ directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 9 years, 5 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/webdata/logins_table.cc ('k') | chrome/browser/webdata/token_service_table.cc » ('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) 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/webdata/logins_table.h" 5 #include "chrome/browser/webdata/logins_table.h"
6 6
7 #include "app/sql/statement.h"
8 #include "base/logging.h" 7 #include "base/logging.h"
9 #include "base/time.h" 8 #include "base/time.h"
10 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
11 #include "chrome/browser/password_manager/ie7_password.h" 10 #include "chrome/browser/password_manager/ie7_password.h"
11 #include "sql/statement.h"
12 12
13 bool LoginsTable::AddIE7Login(const IE7PasswordInfo& info) { 13 bool LoginsTable::AddIE7Login(const IE7PasswordInfo& info) {
14 sql::Statement s(db_->GetUniqueStatement( 14 sql::Statement s(db_->GetUniqueStatement(
15 "INSERT OR REPLACE INTO ie7_logins " 15 "INSERT OR REPLACE INTO ie7_logins "
16 "(url_hash, password_value, date_created) " 16 "(url_hash, password_value, date_created) "
17 "VALUES (?,?,?)")); 17 "VALUES (?,?,?)"));
18 if (!s) { 18 if (!s) {
19 NOTREACHED() << db_->GetErrorMessage(); 19 NOTREACHED() << db_->GetErrorMessage();
20 return false; 20 return false;
21 } 21 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
61 61
62 s.BindString(0, WideToUTF8(info.url_hash)); 62 s.BindString(0, WideToUTF8(info.url_hash));
63 if (s.Step()) { 63 if (s.Step()) {
64 s.ColumnBlobAsVector(0, &result->encrypted_data); 64 s.ColumnBlobAsVector(0, &result->encrypted_data);
65 result->date_created = base::Time::FromTimeT(s.ColumnInt64(1)); 65 result->date_created = base::Time::FromTimeT(s.ColumnInt64(1));
66 result->url_hash = info.url_hash; 66 result->url_hash = info.url_hash;
67 } 67 }
68 return s.Succeeded(); 68 return s.Succeeded();
69 } 69 }
OLDNEW
« no previous file with comments | « chrome/browser/webdata/logins_table.cc ('k') | chrome/browser/webdata/token_service_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698