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

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

Issue 10227014: Remove the very old code that migrated password data from the WebDataService to PasswordStore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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
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/webdata/web_database.h" 5 #include "chrome/browser/webdata/web_database.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "chrome/browser/diagnostics/sqlite_diagnostics.h" 9 #include "chrome/browser/diagnostics/sqlite_diagnostics.h"
10 #include "chrome/browser/webdata/autofill_table.h" 10 #include "chrome/browser/webdata/autofill_table.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 if (!meta_table_.Init(&db_, kCurrentVersionNumber, kCompatibleVersionNumber)) 124 if (!meta_table_.Init(&db_, kCurrentVersionNumber, kCompatibleVersionNumber))
125 return sql::INIT_FAILURE; 125 return sql::INIT_FAILURE;
126 if (meta_table_.GetCompatibleVersionNumber() > kCurrentVersionNumber) { 126 if (meta_table_.GetCompatibleVersionNumber() > kCurrentVersionNumber) {
127 LOG(WARNING) << "Web database is too new."; 127 LOG(WARNING) << "Web database is too new.";
128 return sql::INIT_TOO_NEW; 128 return sql::INIT_TOO_NEW;
129 } 129 }
130 130
131 // Create the tables. 131 // Create the tables.
132 autofill_table_.reset(new AutofillTable(&db_, &meta_table_)); 132 autofill_table_.reset(new AutofillTable(&db_, &meta_table_));
133 keyword_table_.reset(new KeywordTable(&db_, &meta_table_)); 133 keyword_table_.reset(new KeywordTable(&db_, &meta_table_));
134 // TODO(mdm): We only really need the LoginsTable on Windows for IE7 password
135 // access, but for now, we still create it on all platforms since it deletes
136 // the old logins table. We can remove this after a while, e.g. in M22 or so.
134 logins_table_.reset(new LoginsTable(&db_, &meta_table_)); 137 logins_table_.reset(new LoginsTable(&db_, &meta_table_));
135 token_service_table_.reset(new TokenServiceTable(&db_, &meta_table_)); 138 token_service_table_.reset(new TokenServiceTable(&db_, &meta_table_));
136 web_apps_table_.reset(new WebAppsTable(&db_, &meta_table_)); 139 web_apps_table_.reset(new WebAppsTable(&db_, &meta_table_));
137 web_intents_table_.reset(new WebIntentsTable(&db_, &meta_table_)); 140 web_intents_table_.reset(new WebIntentsTable(&db_, &meta_table_));
138 141
139 // Initialize the tables. 142 // Initialize the tables.
140 if (!keyword_table_->Init() || !autofill_table_->Init() || 143 if (!keyword_table_->Init() || !autofill_table_->Init() ||
141 !logins_table_->Init() || !web_apps_table_->Init() || 144 !logins_table_->Init() || !web_apps_table_->Init() ||
142 !token_service_table_->Init() || !web_intents_table_->Init() ) { 145 !token_service_table_->Init() || !web_intents_table_->Init() ) {
143 LOG(WARNING) << "Unable to initialize the web database."; 146 LOG(WARNING) << "Unable to initialize the web database.";
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 323
321 // Add successive versions here. Each should set the version number and 324 // Add successive versions here. Each should set the version number and
322 // compatible version number as appropriate, then fall through to the next 325 // compatible version number as appropriate, then fall through to the next
323 // case. 326 // case.
324 327
325 case kCurrentVersionNumber: 328 case kCurrentVersionNumber:
326 // No migration needed. 329 // No migration needed.
327 return sql::INIT_OK; 330 return sql::INIT_OK;
328 } 331 }
329 } 332 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698