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

Side by Side Diff: components/signin/core/browser/test_signin_client.cc

Issue 2257793002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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
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 "components/signin/core/browser/test_signin_client.h" 5 #include "components/signin/core/browser/test_signin_client.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "components/signin/core/browser/webdata/token_service_table.h" 10 #include "components/signin/core/browser/webdata/token_service_table.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 } 51 }
52 52
53 std::string TestSigninClient::GetProductVersion() { return ""; } 53 std::string TestSigninClient::GetProductVersion() { return ""; }
54 54
55 void TestSigninClient::LoadTokenDatabase() { 55 void TestSigninClient::LoadTokenDatabase() {
56 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 56 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
57 base::FilePath path = temp_dir_.path().AppendASCII("TestWebDB"); 57 base::FilePath path = temp_dir_.path().AppendASCII("TestWebDB");
58 scoped_refptr<WebDatabaseService> web_database = 58 scoped_refptr<WebDatabaseService> web_database =
59 new WebDatabaseService(path, base::ThreadTaskRunnerHandle::Get(), 59 new WebDatabaseService(path, base::ThreadTaskRunnerHandle::Get(),
60 base::ThreadTaskRunnerHandle::Get()); 60 base::ThreadTaskRunnerHandle::Get());
61 web_database->AddTable(base::WrapUnique(new TokenServiceTable())); 61 web_database->AddTable(base::MakeUnique<TokenServiceTable>());
62 web_database->LoadDatabase(); 62 web_database->LoadDatabase();
63 database_ = 63 database_ =
64 new TokenWebData(web_database, base::ThreadTaskRunnerHandle::Get(), 64 new TokenWebData(web_database, base::ThreadTaskRunnerHandle::Get(),
65 base::ThreadTaskRunnerHandle::Get(), 65 base::ThreadTaskRunnerHandle::Get(),
66 WebDataServiceBase::ProfileErrorCallback()); 66 WebDataServiceBase::ProfileErrorCallback());
67 database_->Init(); 67 database_->Init();
68 } 68 }
69 69
70 bool TestSigninClient::ShouldMergeSigninCredentialsIntoCookieJar() { 70 bool TestSigninClient::ShouldMergeSigninCredentialsIntoCookieJar() {
71 return true; 71 return true;
(...skipping 30 matching lines...) Expand all
102 void TestSigninClient::DelayNetworkCall(const base::Closure& callback) { 102 void TestSigninClient::DelayNetworkCall(const base::Closure& callback) {
103 callback.Run(); 103 callback.Run();
104 } 104 }
105 105
106 GaiaAuthFetcher* TestSigninClient::CreateGaiaAuthFetcher( 106 GaiaAuthFetcher* TestSigninClient::CreateGaiaAuthFetcher(
107 GaiaAuthConsumer* consumer, 107 GaiaAuthConsumer* consumer,
108 const std::string& source, 108 const std::string& source,
109 net::URLRequestContextGetter* getter) { 109 net::URLRequestContextGetter* getter) {
110 return new GaiaAuthFetcher(consumer, source, getter); 110 return new GaiaAuthFetcher(consumer, source, getter);
111 } 111 }
OLDNEW
« no previous file with comments | « components/search_provider_logos/logo_cache.cc ('k') | components/signin/core/browser/webdata/token_web_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698