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

Side by Side Diff: chrome/browser/extensions/api/gcd_private/privet_v3_context_getter_unittest.cc

Issue 2133083002: Remove all remaining traces of MessageLoopProxy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/extensions/api/gcd_private/privet_v3_context_getter.h" 5 #include "chrome/browser/extensions/api/gcd_private/privet_v3_context_getter.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 15 matching lines...) Expand all
26 using net::EmbeddedTestServer; 26 using net::EmbeddedTestServer;
27 27
28 class PrivetV3ContextGetterTest : public testing::Test, 28 class PrivetV3ContextGetterTest : public testing::Test,
29 public net::URLFetcherDelegate { 29 public net::URLFetcherDelegate {
30 protected: 30 protected:
31 PrivetV3ContextGetterTest() 31 PrivetV3ContextGetterTest()
32 : thread_bundle_(content::TestBrowserThreadBundle::REAL_IO_THREAD) {} 32 : thread_bundle_(content::TestBrowserThreadBundle::REAL_IO_THREAD) {}
33 33
34 void SetUp() override { 34 void SetUp() override {
35 context_getter_ = new extensions::PrivetV3ContextGetter( 35 context_getter_ = new extensions::PrivetV3ContextGetter(
36 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); 36 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
37 } 37 }
38 38
39 void OnURLFetchComplete(const net::URLFetcher* source) override { 39 void OnURLFetchComplete(const net::URLFetcher* source) override {
40 done_ = true; 40 done_ = true;
41 status_ = source->GetStatus(); 41 status_ = source->GetStatus();
42 42
43 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, quit_); 43 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, quit_);
44 } 44 }
45 45
46 void CreateServer(EmbeddedTestServer::Type type) { 46 void CreateServer(EmbeddedTestServer::Type type) {
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 CreateServer(EmbeddedTestServer::TYPE_HTTPS); 125 CreateServer(EmbeddedTestServer::TYPE_HTTPS);
126 SetFingerprint(GetServerFingerprint()); 126 SetFingerprint(GetServerFingerprint());
127 EXPECT_EQ(net::URLRequestStatus::SUCCESS, Run()); 127 EXPECT_EQ(net::URLRequestStatus::SUCCESS, Run());
128 } 128 }
129 } 129 }
130 130
131 } // namespace 131 } // namespace
132 132
133 } // namespace extensions 133 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698