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

Side by Side Diff: webkit/quota/quota_database_unittest.cc

Issue 9005036: [sql] WARN_UNUSED_RESULT on Execute(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error in quota_database_unittest.cc. Created 9 years 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 | « sql/connection.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) 2011 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 <algorithm> 5 #include <algorithm>
6 #include <iterator> 6 #include <iterator>
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 statement.BindInt(1, static_cast<int>(itr->type)); 410 statement.BindInt(1, static_cast<int>(itr->type));
411 statement.BindInt(2, itr->used_count); 411 statement.BindInt(2, itr->used_count);
412 statement.BindInt64(3, itr->last_access_time.ToInternalValue()); 412 statement.BindInt64(3, itr->last_access_time.ToInternalValue());
413 statement.BindInt64(4, itr->last_modified_time.ToInternalValue()); 413 statement.BindInt64(4, itr->last_modified_time.ToInternalValue());
414 EXPECT_TRUE(statement.Run()); 414 EXPECT_TRUE(statement.Run());
415 } 415 }
416 } 416 }
417 417
418 bool OpenDatabase(sql::Connection* db, const FilePath& kDbFile) { 418 bool OpenDatabase(sql::Connection* db, const FilePath& kDbFile) {
419 if (kDbFile.empty()) { 419 if (kDbFile.empty()) {
420 db->OpenInMemory(); 420 return db->OpenInMemory();
421 return true;
422 } 421 }
423 if (!file_util::CreateDirectory(kDbFile.DirName())) 422 if (!file_util::CreateDirectory(kDbFile.DirName()))
424 return false; 423 return false;
425 if (!db->Open(kDbFile)) 424 if (!db->Open(kDbFile))
426 return false; 425 return false;
427 db->Preload(); 426 db->Preload();
428 return true; 427 return true;
429 } 428 }
430 429
431 // Create V2 database and populate some data. 430 // Create V2 database and populate some data.
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 } 557 }
559 558
560 TEST_F(QuotaDatabaseTest, DumpOriginInfoTable) { 559 TEST_F(QuotaDatabaseTest, DumpOriginInfoTable) {
561 ScopedTempDir data_dir; 560 ScopedTempDir data_dir;
562 ASSERT_TRUE(data_dir.CreateUniqueTempDir()); 561 ASSERT_TRUE(data_dir.CreateUniqueTempDir());
563 const FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db"); 562 const FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db");
564 DumpOriginInfoTable(kDbFile); 563 DumpOriginInfoTable(kDbFile);
565 DumpOriginInfoTable(FilePath()); 564 DumpOriginInfoTable(FilePath());
566 } 565 }
567 } // namespace quota 566 } // namespace quota
OLDNEW
« no previous file with comments | « sql/connection.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698