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

Side by Side Diff: chrome/browser/services/gcm/gcm_profile_service.cc

Issue 1293393003: Componentize gcm_account_tracker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « chrome/browser/services/gcm/gcm_account_tracker_unittest.cc ('k') | chrome/chrome_browser.gypi » ('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 "chrome/browser/services/gcm/gcm_profile_service.h" 5 #include "chrome/browser/services/gcm/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"
11 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/common/chrome_constants.h" 12 #include "chrome/common/chrome_constants.h"
13 #include "components/gcm_driver/gcm_driver.h" 13 #include "components/gcm_driver/gcm_driver.h"
14 #include "components/pref_registry/pref_registry_syncable.h" 14 #include "components/pref_registry/pref_registry_syncable.h"
15 15
16 #if defined(OS_ANDROID) 16 #if defined(OS_ANDROID)
17 #include "base/sequenced_task_runner.h" 17 #include "base/sequenced_task_runner.h"
18 #include "base/threading/sequenced_worker_pool.h" 18 #include "base/threading/sequenced_worker_pool.h"
19 #include "components/gcm_driver/gcm_driver_android.h" 19 #include "components/gcm_driver/gcm_driver_android.h"
20 #include "content/public/browser/browser_thread.h" 20 #include "content/public/browser/browser_thread.h"
21 #else 21 #else
22 #include "base/bind.h" 22 #include "base/bind.h"
23 #include "base/files/file_path.h" 23 #include "base/files/file_path.h"
24 #include "base/memory/weak_ptr.h" 24 #include "base/memory/weak_ptr.h"
25 #include "chrome/browser/services/gcm/gcm_account_tracker.h"
26 #include "chrome/browser/services/gcm/gcm_desktop_utils.h" 25 #include "chrome/browser/services/gcm/gcm_desktop_utils.h"
27 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 26 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
28 #include "chrome/browser/signin/signin_manager_factory.h" 27 #include "chrome/browser/signin/signin_manager_factory.h"
29 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" 28 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
29 #include "components/gcm_driver/gcm_account_tracker.h"
30 #include "components/gcm_driver/gcm_channel_status_syncer.h" 30 #include "components/gcm_driver/gcm_channel_status_syncer.h"
31 #include "components/gcm_driver/gcm_client_factory.h" 31 #include "components/gcm_driver/gcm_client_factory.h"
32 #include "components/gcm_driver/gcm_driver_desktop.h" 32 #include "components/gcm_driver/gcm_driver_desktop.h"
33 #include "components/signin/core/browser/profile_identity_provider.h" 33 #include "components/signin/core/browser/profile_identity_provider.h"
34 #include "components/signin/core/browser/signin_manager.h" 34 #include "components/signin/core/browser/signin_manager.h"
35 #include "google_apis/gaia/account_tracker.h" 35 #include "google_apis/gaia/account_tracker.h"
36 #include "google_apis/gaia/identity_provider.h" 36 #include "google_apis/gaia/identity_provider.h"
37 #include "net/url_request/url_request_context_getter.h" 37 #include "net/url_request/url_request_context_getter.h"
38 #endif 38 #endif
39 39
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 void GCMProfileService::SetDriverForTesting(GCMDriver* driver) { 207 void GCMProfileService::SetDriverForTesting(GCMDriver* driver) {
208 driver_.reset(driver); 208 driver_.reset(driver);
209 #if !defined(OS_ANDROID) 209 #if !defined(OS_ANDROID)
210 if (identity_observer_) 210 if (identity_observer_)
211 identity_observer_.reset(new IdentityObserver(profile_, driver)); 211 identity_observer_.reset(new IdentityObserver(profile_, driver));
212 #endif // !defined(OS_ANDROID) 212 #endif // !defined(OS_ANDROID)
213 } 213 }
214 214
215 } // namespace gcm 215 } // namespace gcm
OLDNEW
« no previous file with comments | « chrome/browser/services/gcm/gcm_account_tracker_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698