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

Unified Diff: chrome/browser/webdata/logins_table_win.cc

Issue 380023002: Move Password specific webdata logic into passwords component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/webdata/logins_table.cc ('k') | chrome/browser/webdata/password_web_data_service_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/webdata/logins_table_win.cc
diff --git a/chrome/browser/webdata/logins_table_win.cc b/chrome/browser/webdata/logins_table_win.cc
deleted file mode 100644
index bac1880748edc4637b8782518f0edbea00ef02e0..0000000000000000000000000000000000000000
--- a/chrome/browser/webdata/logins_table_win.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/webdata/logins_table.h"
-
-#include "base/logging.h"
-#include "base/strings/utf_string_conversions.h"
-#include "base/time/time.h"
-#include "components/os_crypt/ie7_password_win.h"
-#include "sql/statement.h"
-
-bool LoginsTable::AddIE7Login(const IE7PasswordInfo& info) {
- sql::Statement s(db_->GetUniqueStatement(
- "INSERT OR REPLACE INTO ie7_logins "
- "(url_hash, password_value, date_created) "
- "VALUES (?,?,?)"));
- s.BindString(0, base::WideToUTF8(info.url_hash));
- s.BindBlob(1, &info.encrypted_data.front(),
- static_cast<int>(info.encrypted_data.size()));
- s.BindInt64(2, info.date_created.ToTimeT());
-
- return s.Run();
-}
-
-bool LoginsTable::RemoveIE7Login(const IE7PasswordInfo& info) {
- // Remove a login by UNIQUE-constrained fields.
- sql::Statement s(db_->GetUniqueStatement(
- "DELETE FROM ie7_logins WHERE url_hash = ?"));
- s.BindString(0, base::WideToUTF8(info.url_hash));
-
- return s.Run();
-}
-
-bool LoginsTable::GetIE7Login(const IE7PasswordInfo& info,
- IE7PasswordInfo* result) {
- DCHECK(result);
- sql::Statement s(db_->GetUniqueStatement(
- "SELECT password_value, date_created FROM ie7_logins "
- "WHERE url_hash == ? "));
- s.BindString16(0, info.url_hash);
-
- if (s.Step()) {
- s.ColumnBlobAsVector(0, &result->encrypted_data);
- result->date_created = base::Time::FromTimeT(s.ColumnInt64(1));
- result->url_hash = info.url_hash;
- }
- return s.Succeeded();
-}
« no previous file with comments | « chrome/browser/webdata/logins_table.cc ('k') | chrome/browser/webdata/password_web_data_service_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698