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

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

Issue 6293011: Initialized pair_id variable to 0.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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/web_database.h ('k') | no next file » | 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) 2010 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/web_database.h" 5 #include "chrome/browser/webdata/web_database.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
11 11
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 "SELECT pair_id, count FROM autofill " 1195 "SELECT pair_id, count FROM autofill "
1196 "WHERE name = ? AND value = ?")); 1196 "WHERE name = ? AND value = ?"));
1197 if (!s) { 1197 if (!s) {
1198 NOTREACHED() << "Statement prepare failed"; 1198 NOTREACHED() << "Statement prepare failed";
1199 return false; 1199 return false;
1200 } 1200 }
1201 1201
1202 s.BindString16(0, element.name()); 1202 s.BindString16(0, element.name());
1203 s.BindString16(1, element.value()); 1203 s.BindString16(1, element.value());
1204 1204
1205 *pair_id = 0;
1205 *count = 0; 1206 *count = 0;
1206 1207
1207 if (s.Step()) { 1208 if (s.Step()) {
1208 *pair_id = s.ColumnInt64(0); 1209 *pair_id = s.ColumnInt64(0);
1209 *count = s.ColumnInt(1); 1210 *count = s.ColumnInt(1);
1210 } 1211 }
1211 1212
1212 return true; 1213 return true;
1213 } 1214 }
1214 1215
(...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after
2577 2578
2578 // Add successive versions here. Each should set the version number and 2579 // Add successive versions here. Each should set the version number and
2579 // compatible version number as appropriate, then fall through to the next 2580 // compatible version number as appropriate, then fall through to the next
2580 // case. 2581 // case.
2581 2582
2582 case kCurrentVersionNumber: 2583 case kCurrentVersionNumber:
2583 // No migration needed. 2584 // No migration needed.
2584 return sql::INIT_OK; 2585 return sql::INIT_OK;
2585 } 2586 }
2586 } 2587 }
OLDNEW
« no previous file with comments | « chrome/browser/webdata/web_database.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698