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

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

Issue 18805: Correct sqlite wrapper behavior on systems where wchar_t is UTF-32, (Closed)
Patch Set: minor fixes Created 11 years, 10 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
« no previous file with comments | « chrome/browser/history/url_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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "chrome/browser/history/page_usage_data.h" 9 #include "chrome/browser/history/page_usage_data.h"
10 #include "chrome/common/sqlite_compiled_statement.h" 10 #include "chrome/common/sqlite_compiled_statement.h"
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 NOTREACHED(); 308 NOTREACHED();
309 return; 309 return;
310 } 310 }
311 for (size_t i = 0; i < results->size(); ++i) { 311 for (size_t i = 0; i < results->size(); ++i) {
312 PageUsageData* pud = (*results)[i]; 312 PageUsageData* pud = (*results)[i];
313 statement2->bind_int64(0, pud->GetID()); 313 statement2->bind_int64(0, pud->GetID());
314 if (statement2->step() == SQLITE_ROW) { 314 if (statement2->step() == SQLITE_ROW) {
315 std::string url; 315 std::string url;
316 std::wstring title; 316 std::wstring title;
317 statement2->column_string(0, &url); 317 statement2->column_string(0, &url);
318 statement2->column_string16(1, &title); 318 statement2->column_wstring(1, &title);
319 pud->SetURL(GURL(url)); 319 pud->SetURL(GURL(url));
320 pud->SetTitle(title); 320 pud->SetTitle(title);
321 } 321 }
322 statement2->reset(); 322 statement2->reset();
323 } 323 }
324 } 324 }
325 325
326 void VisitSegmentDatabase::DeleteSegmentData(const Time& older_than) { 326 void VisitSegmentDatabase::DeleteSegmentData(const Time& older_than) {
327 SQLITE_UNIQUE_STATEMENT(statement, GetStatementCache(), 327 SQLITE_UNIQUE_STATEMENT(statement, GetStatementCache(),
328 "DELETE FROM segment_usage WHERE time_slot < ?"); 328 "DELETE FROM segment_usage WHERE time_slot < ?");
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 NOTREACHED(); 381 NOTREACHED();
382 r = false; 382 r = false;
383 } 383 }
384 delete_usage->reset(); 384 delete_usage->reset();
385 delete_seg->reset(); 385 delete_seg->reset();
386 } 386 }
387 return r; 387 return r;
388 } 388 }
389 389
390 } // namespace history 390 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/url_database.cc ('k') | chrome/browser/importer/firefox3_importer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698