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

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

Issue 501183003: Remove implicit conversions from scoped_refptr to T* in content/browser/indexed_db/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | content/browser/indexed_db/indexed_db_backing_store.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <set> 5 #include <set>
6 6
7 #include "base/test/test_simple_task_runner.h" 7 #include "base/test/test_simple_task_runner.h"
8 #include "content/browser/indexed_db/indexed_db_active_blob_registry.h" 8 #include "content/browser/indexed_db/indexed_db_active_blob_registry.h"
9 #include "content/browser/indexed_db/indexed_db_backing_store.h" 9 #include "content/browser/indexed_db/indexed_db_backing_store.h"
10 #include "content/browser/indexed_db/indexed_db_fake_backing_store.h" 10 #include "content/browser/indexed_db/indexed_db_fake_backing_store.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 ReleaseCallback; 94 ReleaseCallback;
95 95
96 static const int64 kDatabaseId0 = 7; 96 static const int64 kDatabaseId0 = 7;
97 static const int64 kDatabaseId1 = 12; 97 static const int64 kDatabaseId1 = 12;
98 static const int64 kBlobKey0 = 77; 98 static const int64 kBlobKey0 = 77;
99 static const int64 kBlobKey1 = 14; 99 static const int64 kBlobKey1 = 14;
100 100
101 IndexedDBActiveBlobRegistryTest() 101 IndexedDBActiveBlobRegistryTest()
102 : task_runner_(new base::TestSimpleTaskRunner), 102 : task_runner_(new base::TestSimpleTaskRunner),
103 factory_(new RegistryTestMockFactory), 103 factory_(new RegistryTestMockFactory),
104 backing_store_(new MockIDBBackingStore(factory_, task_runner_)), 104 backing_store_(
105 new MockIDBBackingStore(factory_.get(), task_runner_.get())),
105 registry_(new IndexedDBActiveBlobRegistry(backing_store_.get())) {} 106 registry_(new IndexedDBActiveBlobRegistry(backing_store_.get())) {}
106 107
107 void RunUntilIdle() { task_runner_->RunUntilIdle(); } 108 void RunUntilIdle() { task_runner_->RunUntilIdle(); }
108 RegistryTestMockFactory* factory() const { return factory_.get(); } 109 RegistryTestMockFactory* factory() const { return factory_.get(); }
109 MockIDBBackingStore* backing_store() const { return backing_store_.get(); } 110 MockIDBBackingStore* backing_store() const { return backing_store_.get(); }
110 IndexedDBActiveBlobRegistry* registry() const { return registry_.get(); } 111 IndexedDBActiveBlobRegistry* registry() const { return registry_.get(); }
111 112
112 private: 113 private:
113 scoped_refptr<base::TestSimpleTaskRunner> task_runner_; 114 scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
114 scoped_refptr<RegistryTestMockFactory> factory_; 115 scoped_refptr<RegistryTestMockFactory> factory_;
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 RunUntilIdle(); 268 RunUntilIdle();
268 269
269 // Nothing changes. 270 // Nothing changes.
270 EXPECT_TRUE(factory()->CheckSingleOriginInUse(backing_store()->origin_url())); 271 EXPECT_TRUE(factory()->CheckSingleOriginInUse(backing_store()->origin_url()));
271 EXPECT_TRUE(backing_store()->CheckUnusedBlobsEmpty()); 272 EXPECT_TRUE(backing_store()->CheckUnusedBlobsEmpty());
272 } 273 }
273 274
274 } // namespace 275 } // namespace
275 276
276 } // namespace content 277 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_backing_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698