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

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

Issue 2111973002: Add support for GCM subtypes to desktop Instance ID implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@iid9push
Patch Set: Remove channel from product_category_for_subtypes, and address nits Created 4 years, 4 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 | « components/gcm_driver/gcm_profile_service.h ('k') | components/gcm_driver/instance_id/BUILD.gn » ('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) 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 <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner) { 134 scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner) {
135 driver_.reset(new GCMDriverAndroid(path.Append(gcm_driver::kGCMStoreDirname), 135 driver_.reset(new GCMDriverAndroid(path.Append(gcm_driver::kGCMStoreDirname),
136 blocking_task_runner)); 136 blocking_task_runner));
137 } 137 }
138 #else 138 #else
139 GCMProfileService::GCMProfileService( 139 GCMProfileService::GCMProfileService(
140 PrefService* prefs, 140 PrefService* prefs,
141 base::FilePath path, 141 base::FilePath path,
142 net::URLRequestContextGetter* request_context, 142 net::URLRequestContextGetter* request_context,
143 version_info::Channel channel, 143 version_info::Channel channel,
144 const std::string& product_category_for_subtypes,
144 std::unique_ptr<ProfileIdentityProvider> identity_provider, 145 std::unique_ptr<ProfileIdentityProvider> identity_provider,
145 std::unique_ptr<GCMClientFactory> gcm_client_factory, 146 std::unique_ptr<GCMClientFactory> gcm_client_factory,
146 const scoped_refptr<base::SequencedTaskRunner>& ui_task_runner, 147 const scoped_refptr<base::SequencedTaskRunner>& ui_task_runner,
147 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner, 148 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner,
148 scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner) 149 scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner)
149 : profile_identity_provider_(std::move(identity_provider)), 150 : profile_identity_provider_(std::move(identity_provider)),
150 request_context_(request_context) { 151 request_context_(request_context) {
151 driver_ = CreateGCMDriverDesktop(std::move(gcm_client_factory), prefs, 152 driver_ = CreateGCMDriverDesktop(
152 path.Append(gcm_driver::kGCMStoreDirname), 153 std::move(gcm_client_factory), prefs,
153 request_context_, channel, ui_task_runner, 154 path.Append(gcm_driver::kGCMStoreDirname), request_context_, channel,
154 io_task_runner, blocking_task_runner); 155 product_category_for_subtypes, ui_task_runner, io_task_runner,
156 blocking_task_runner);
155 157
156 identity_observer_.reset(new IdentityObserver( 158 identity_observer_.reset(new IdentityObserver(
157 profile_identity_provider_.get(), request_context_, driver_.get())); 159 profile_identity_provider_.get(), request_context_, driver_.get()));
158 } 160 }
159 #endif // defined(OS_ANDROID) 161 #endif // defined(OS_ANDROID)
160 162
161 GCMProfileService::GCMProfileService() {} 163 GCMProfileService::GCMProfileService() {}
162 164
163 GCMProfileService::~GCMProfileService() {} 165 GCMProfileService::~GCMProfileService() {}
164 166
(...skipping 11 matching lines...) Expand all
176 driver_.reset(driver); 178 driver_.reset(driver);
177 #if !defined(OS_ANDROID) 179 #if !defined(OS_ANDROID)
178 if (identity_observer_) { 180 if (identity_observer_) {
179 identity_observer_.reset(new IdentityObserver( 181 identity_observer_.reset(new IdentityObserver(
180 profile_identity_provider_.get(), request_context_, driver)); 182 profile_identity_provider_.get(), request_context_, driver));
181 } 183 }
182 #endif // !defined(OS_ANDROID) 184 #endif // !defined(OS_ANDROID)
183 } 185 }
184 186
185 } // namespace gcm 187 } // namespace gcm
OLDNEW
« no previous file with comments | « components/gcm_driver/gcm_profile_service.h ('k') | components/gcm_driver/instance_id/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698