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

Unified Diff: chrome/browser/webdata/logins_table.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.h ('k') | chrome/browser/webdata/logins_table_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/webdata/logins_table.cc
diff --git a/chrome/browser/webdata/logins_table.cc b/chrome/browser/webdata/logins_table.cc
deleted file mode 100644
index ff14bcba8a6bef11099b52fea44b063ef1ea8ca1..0000000000000000000000000000000000000000
--- a/chrome/browser/webdata/logins_table.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) 2012 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 <limits>
-
-#include "base/logging.h"
-#include "components/webdata/common/web_database.h"
-#include "sql/statement.h"
-
-namespace {
-
-WebDatabaseTable::TypeKey GetKey() {
- // We just need a unique constant. Use the address of a static that
- // COMDAT folding won't touch in an optimizing linker.
- static int table_key = 0;
- return reinterpret_cast<void*>(&table_key);
-}
-
-} // namespace
-
-LoginsTable* LoginsTable::FromWebDatabase(WebDatabase* db) {
- return static_cast<LoginsTable*>(db->GetTable(GetKey()));
-}
-
-WebDatabaseTable::TypeKey LoginsTable::GetTypeKey() const {
- return GetKey();
-}
-
-bool LoginsTable::CreateTablesIfNecessary() {
- if (db_->DoesTableExist("logins")) {
- // We don't check for success. It doesn't matter that much.
- // If we fail we'll just try again later anyway.
- ignore_result(db_->Execute("DROP TABLE logins"));
- }
-
-#if defined(OS_WIN)
- if (!db_->DoesTableExist("ie7_logins")) {
- if (!db_->Execute("CREATE TABLE ie7_logins ("
- "url_hash VARCHAR NOT NULL, "
- "password_value BLOB, "
- "date_created INTEGER NOT NULL,"
- "UNIQUE "
- "(url_hash))")) {
- NOTREACHED();
- return false;
- }
- if (!db_->Execute("CREATE INDEX ie7_logins_hash ON "
- "ie7_logins (url_hash)")) {
- NOTREACHED();
- return false;
- }
- }
-#endif
-
- return true;
-}
-
-bool LoginsTable::IsSyncable() {
- return true;
-}
-
-bool LoginsTable::MigrateToVersion(int version,
- bool* update_compatible_version) {
- return true;
-}
« no previous file with comments | « chrome/browser/webdata/logins_table.h ('k') | chrome/browser/webdata/logins_table_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698