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

Side by Side Diff: chrome/browser/history/visitsegment_database.cc

Issue 10171014: Changed to Reset(bool clear_bound_vars) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac build error. 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
« no previous file with comments | « chrome/browser/history/text_database.cc ('k') | chrome/browser/importer/firefox3_importer.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) 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/history/visitsegment_database.h" 5 #include "chrome/browser/history/visitsegment_database.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 if (!statement2.is_valid()) 291 if (!statement2.is_valid())
292 return; 292 return;
293 293
294 for (size_t i = 0; i < results->size(); ++i) { 294 for (size_t i = 0; i < results->size(); ++i) {
295 PageUsageData* pud = (*results)[i]; 295 PageUsageData* pud = (*results)[i];
296 statement2.BindInt64(0, pud->GetID()); 296 statement2.BindInt64(0, pud->GetID());
297 if (statement2.Step()) { 297 if (statement2.Step()) {
298 pud->SetURL(GURL(statement2.ColumnString(0))); 298 pud->SetURL(GURL(statement2.ColumnString(0)));
299 pud->SetTitle(statement2.ColumnString16(1)); 299 pud->SetTitle(statement2.ColumnString16(1));
300 } 300 }
301 statement2.Reset(); 301 statement2.Reset(true);
302 } 302 }
303 } 303 }
304 304
305 bool VisitSegmentDatabase::DeleteSegmentData(base::Time older_than) { 305 bool VisitSegmentDatabase::DeleteSegmentData(base::Time older_than) {
306 sql::Statement statement(GetDB().GetCachedStatement(SQL_FROM_HERE, 306 sql::Statement statement(GetDB().GetCachedStatement(SQL_FROM_HERE,
307 "DELETE FROM segment_usage WHERE time_slot < ?")); 307 "DELETE FROM segment_usage WHERE time_slot < ?"));
308 statement.BindInt64(0, older_than.LocalMidnight().ToInternalValue()); 308 statement.BindInt64(0, older_than.LocalMidnight().ToInternalValue());
309 309
310 return statement.Run(); 310 return statement.Run();
311 } 311 }
(...skipping 20 matching lines...) Expand all
332 return false; 332 return false;
333 333
334 sql::Statement delete_seg(GetDB().GetCachedStatement(SQL_FROM_HERE, 334 sql::Statement delete_seg(GetDB().GetCachedStatement(SQL_FROM_HERE,
335 "DELETE FROM segments WHERE url_id = ?")); 335 "DELETE FROM segments WHERE url_id = ?"));
336 delete_seg.BindInt64(0, url_id); 336 delete_seg.BindInt64(0, url_id);
337 337
338 return delete_seg.Run(); 338 return delete_seg.Run();
339 } 339 }
340 340
341 } // namespace history 341 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/text_database.cc ('k') | chrome/browser/importer/firefox3_importer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698