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

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

Issue 17948002: Update Linux to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 5 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
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 <map> 5 #include <map>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 29 matching lines...) Expand all
40 kOriginOther("http://other"), 40 kOriginOther("http://other"),
41 usage_(0), 41 usage_(0),
42 task_runner_(new base::TestSimpleTaskRunner), 42 task_runner_(new base::TestSimpleTaskRunner),
43 weak_factory_(this) { 43 weak_factory_(this) {
44 browser_context_.reset(new TestBrowserContext()); 44 browser_context_.reset(new TestBrowserContext());
45 45
46 scoped_refptr<quota::QuotaManager> quota_manager = 46 scoped_refptr<quota::QuotaManager> quota_manager =
47 new quota::MockQuotaManager( 47 new quota::MockQuotaManager(
48 false /*in_memory*/, 48 false /*in_memory*/,
49 browser_context_->GetPath(), 49 browser_context_->GetPath(),
50 base::MessageLoop::current()->message_loop_proxy(), 50 base::MessageLoop::current()->message_loop_proxy().get(),
51 base::MessageLoop::current()->message_loop_proxy(), 51 base::MessageLoop::current()->message_loop_proxy().get(),
52 browser_context_->GetSpecialStoragePolicy()); 52 browser_context_->GetSpecialStoragePolicy());
53 53
54 idb_context_ = 54 idb_context_ =
55 new IndexedDBContextImpl(browser_context_->GetPath(), 55 new IndexedDBContextImpl(browser_context_->GetPath(),
56 browser_context_->GetSpecialStoragePolicy(), 56 browser_context_->GetSpecialStoragePolicy(),
57 quota_manager->proxy(), 57 quota_manager->proxy(),
58 task_runner_); 58 task_runner_.get());
59 base::MessageLoop::current()->RunUntilIdle(); 59 base::MessageLoop::current()->RunUntilIdle();
60 setup_temp_dir(); 60 setup_temp_dir();
61 } 61 }
62 62
63 void FlushIndexedDBTaskRunner() { 63 void FlushIndexedDBTaskRunner() {
64 task_runner_->RunUntilIdle(); 64 task_runner_->RunUntilIdle();
65 } 65 }
66 66
67 void setup_temp_dir() { 67 void setup_temp_dir() {
68 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 68 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 EXPECT_EQ(1000, GetOriginUsage(&client, kOriginA, kTemp)); 237 EXPECT_EQ(1000, GetOriginUsage(&client, kOriginA, kTemp));
238 EXPECT_EQ(50, GetOriginUsage(&client, kOriginB, kTemp)); 238 EXPECT_EQ(50, GetOriginUsage(&client, kOriginB, kTemp));
239 239
240 quota::QuotaStatusCode delete_status = DeleteOrigin(&client, kOriginA); 240 quota::QuotaStatusCode delete_status = DeleteOrigin(&client, kOriginA);
241 EXPECT_EQ(quota::kQuotaStatusOk, delete_status); 241 EXPECT_EQ(quota::kQuotaStatusOk, delete_status);
242 EXPECT_EQ(0, GetOriginUsage(&client, kOriginA, kTemp)); 242 EXPECT_EQ(0, GetOriginUsage(&client, kOriginA, kTemp));
243 EXPECT_EQ(50, GetOriginUsage(&client, kOriginB, kTemp)); 243 EXPECT_EQ(50, GetOriginUsage(&client, kOriginB, kTemp));
244 } 244 }
245 245
246 } // namespace content 246 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_browsertest.cc ('k') | content/browser/indexed_db/indexed_db_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698