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

Side by Side Diff: content/browser/indexed_db/indexed_db_backing_store_unittest.cc

Issue 2472213003: [IndexedDB] Refactoring to remove ref ptrs and host transaction ids. (Closed)
Patch Set: rebased & working Created 4 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/browser/indexed_db/indexed_db_backing_store.h" 5 #include "content/browser/indexed_db/indexed_db_backing_store.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 IndexedDBValue m_value3; 368 IndexedDBValue m_value3;
369 std::vector<IndexedDBBlobInfo> m_blob_info; 369 std::vector<IndexedDBBlobInfo> m_blob_info;
370 370
371 private: 371 private:
372 DISALLOW_COPY_AND_ASSIGN(IndexedDBBackingStoreTest); 372 DISALLOW_COPY_AND_ASSIGN(IndexedDBBackingStoreTest);
373 }; 373 };
374 374
375 class TestCallback : public IndexedDBBackingStore::BlobWriteCallback { 375 class TestCallback : public IndexedDBBackingStore::BlobWriteCallback {
376 public: 376 public:
377 TestCallback() : called(false), succeeded(false) {} 377 TestCallback() : called(false), succeeded(false) {}
378 void Run(bool succeeded_in) override { 378 leveldb::Status Run(bool succeeded_in, bool sync_call) override {
379 called = true; 379 called = true;
380 succeeded = succeeded_in; 380 succeeded = succeeded_in;
381 return leveldb::Status::OK();
381 } 382 }
382 bool called; 383 bool called;
383 bool succeeded; 384 bool succeeded;
384 385
385 protected: 386 protected:
386 ~TestCallback() override {} 387 ~TestCallback() override {}
387 388
388 private: 389 private:
389 DISALLOW_COPY_AND_ASSIGN(TestCallback); 390 DISALLOW_COPY_AND_ASSIGN(TestCallback);
390 }; 391 };
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 1150
1150 // Dictionary, message key and more. 1151 // Dictionary, message key and more.
1151 ASSERT_TRUE(WriteFile(info_path, "{\"message\":\"foo\",\"bar\":5}")); 1152 ASSERT_TRUE(WriteFile(info_path, "{\"message\":\"foo\",\"bar\":5}"));
1152 EXPECT_TRUE( 1153 EXPECT_TRUE(
1153 IndexedDBBackingStore::ReadCorruptionInfo(path_base, origin, &message)); 1154 IndexedDBBackingStore::ReadCorruptionInfo(path_base, origin, &message));
1154 EXPECT_FALSE(PathExists(info_path)); 1155 EXPECT_FALSE(PathExists(info_path));
1155 EXPECT_EQ("foo", message); 1156 EXPECT_EQ("foo", message);
1156 } 1157 }
1157 1158
1158 } // namespace content 1159 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698