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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_indexed_db_helper_unittest.cc

Issue 1117583003: [chrome/browser/browsing_data] Replace MessageLoopProxy usage with ThreadTaskRunnerHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nit Created 5 years, 7 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 | chrome/browser/browsing_data/browsing_data_quota_helper.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browsing_data/browsing_data_indexed_db_helper.h" 5 #include "chrome/browser/browsing_data/browsing_data_indexed_db_helper.h"
6 6
7 #include "base/message_loop/message_loop_proxy.h"
8 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "base/thread_task_runner_handle.h"
9 #include "chrome/test/base/testing_profile.h" 9 #include "chrome/test/base/testing_profile.h"
10 #include "content/public/browser/browser_context.h" 10 #include "content/public/browser/browser_context.h"
11 #include "content/public/browser/storage_partition.h" 11 #include "content/public/browser/storage_partition.h"
12 #include "content/public/test/test_browser_thread_bundle.h" 12 #include "content/public/test/test_browser_thread_bundle.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 namespace { 15 namespace {
16 16
17 class CannedBrowsingDataIndexedDBHelperTest : public testing::Test { 17 class CannedBrowsingDataIndexedDBHelperTest : public testing::Test {
18 public: 18 public:
19 void SetUp() override { 19 void SetUp() override {
20 IndexedDBContext()->SetTaskRunnerForTesting( 20 IndexedDBContext()->SetTaskRunnerForTesting(
21 base::MessageLoopProxy::current().get()); 21 base::ThreadTaskRunnerHandle::Get().get());
22 } 22 }
23 23
24 content::IndexedDBContext* IndexedDBContext() { 24 content::IndexedDBContext* IndexedDBContext() {
25 return content::BrowserContext::GetDefaultStoragePartition(&profile_)-> 25 return content::BrowserContext::GetDefaultStoragePartition(&profile_)->
26 GetIndexedDBContext(); 26 GetIndexedDBContext();
27 } 27 }
28 28
29 private: 29 private:
30 content::TestBrowserThreadBundle thread_bundle_; 30 content::TestBrowserThreadBundle thread_bundle_;
31 TestingProfile profile_; 31 TestingProfile profile_;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 new CannedBrowsingDataIndexedDBHelper(IndexedDBContext())); 74 new CannedBrowsingDataIndexedDBHelper(IndexedDBContext()));
75 75
76 ASSERT_TRUE(helper->empty()); 76 ASSERT_TRUE(helper->empty());
77 helper->AddIndexedDB(origin1, description); 77 helper->AddIndexedDB(origin1, description);
78 ASSERT_TRUE(helper->empty()); 78 ASSERT_TRUE(helper->empty());
79 helper->AddIndexedDB(origin2, description); 79 helper->AddIndexedDB(origin2, description);
80 ASSERT_TRUE(helper->empty()); 80 ASSERT_TRUE(helper->empty());
81 } 81 }
82 82
83 } // namespace 83 } // namespace
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_quota_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698