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

Side by Side Diff: components/gcm_driver/gcm_profile_service.cc

Issue 1464463004: Componentize Unit Test for gcm_profile_service Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 12 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/gcm_driver/gcm_profile_service.h" 5 #include "components/gcm_driver/gcm_profile_service.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 #else 135 #else
136 GCMProfileService::GCMProfileService( 136 GCMProfileService::GCMProfileService(
137 PrefService* prefs, 137 PrefService* prefs,
138 base::FilePath path, 138 base::FilePath path,
139 net::URLRequestContextGetter* request_context, 139 net::URLRequestContextGetter* request_context,
140 version_info::Channel channel, 140 version_info::Channel channel,
141 scoped_ptr<ProfileIdentityProvider> identity_provider, 141 scoped_ptr<ProfileIdentityProvider> identity_provider,
142 scoped_ptr<GCMClientFactory> gcm_client_factory, 142 scoped_ptr<GCMClientFactory> gcm_client_factory,
143 const scoped_refptr<base::SequencedTaskRunner>& ui_task_runner, 143 const scoped_refptr<base::SequencedTaskRunner>& ui_task_runner,
144 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner, 144 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner,
145 scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner) 145 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner)
146 : request_context_(request_context), 146 : request_context_(request_context),
147 profile_identity_provider_(identity_provider.Pass()) { 147 profile_identity_provider_(identity_provider.Pass()) {
148 driver_ = CreateGCMDriverDesktop(gcm_client_factory.Pass(), prefs, 148 driver_ = CreateGCMDriverDesktop(gcm_client_factory.Pass(), prefs,
149 path.Append(gcm_driver::kGCMStoreDirname), 149 path.Append(gcm_driver::kGCMStoreDirname),
150 request_context_, channel, ui_task_runner, 150 request_context_, channel, ui_task_runner,
151 io_task_runner, blocking_task_runner); 151 io_task_runner, blocking_task_runner);
152 152
153 identity_observer_.reset(new IdentityObserver( 153 identity_observer_.reset(new IdentityObserver(
154 profile_identity_provider_.get(), request_context_, driver_.get())); 154 profile_identity_provider_.get(), request_context_, driver_.get()));
155 } 155 }
(...skipping 17 matching lines...) Expand all
173 driver_.reset(driver); 173 driver_.reset(driver);
174 #if !defined(OS_ANDROID) 174 #if !defined(OS_ANDROID)
175 if (identity_observer_) { 175 if (identity_observer_) {
176 identity_observer_.reset(new IdentityObserver( 176 identity_observer_.reset(new IdentityObserver(
177 profile_identity_provider_.get(), request_context_, driver)); 177 profile_identity_provider_.get(), request_context_, driver));
178 } 178 }
179 #endif // !defined(OS_ANDROID) 179 #endif // !defined(OS_ANDROID)
180 } 180 }
181 181
182 } // namespace gcm 182 } // namespace gcm
OLDNEW
« no previous file with comments | « components/gcm_driver/gcm_profile_service.h ('k') | components/gcm_driver/gcm_profile_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698