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

Side by Side Diff: chrome/browser/invalidation/ticl_invalidation_service.h

Issue 116533006: Control invalidations network channel from TiclInvalidationService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 11 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 | « no previous file | chrome/browser/invalidation/ticl_invalidation_service.cc » ('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 #ifndef CHROME_BROWSER_INVALIDATION_TICL_INVALIDATION_SERVICE_H_ 5 #ifndef CHROME_BROWSER_INVALIDATION_TICL_INVALIDATION_SERVICE_H_
6 #define CHROME_BROWSER_INVALIDATION_TICL_INVALIDATION_SERVICE_H_ 6 #define CHROME_BROWSER_INVALIDATION_TICL_INVALIDATION_SERVICE_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/threading/non_thread_safe.h" 9 #include "base/threading/non_thread_safe.h"
10 #include "base/timer/timer.h" 10 #include "base/timer/timer.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // Overrides BrowserContextKeyedService method. 86 // Overrides BrowserContextKeyedService method.
87 virtual void Shutdown() OVERRIDE; 87 virtual void Shutdown() OVERRIDE;
88 88
89 protected: 89 protected:
90 // Initializes with an injected invalidator. 90 // Initializes with an injected invalidator.
91 void InitForTest(syncer::Invalidator* invalidator); 91 void InitForTest(syncer::Invalidator* invalidator);
92 92
93 friend class TiclInvalidationServiceTestDelegate; 93 friend class TiclInvalidationServiceTestDelegate;
94 94
95 private: 95 private:
96 enum InvalidationNetworkChannel {
97 PUSH_CLIENT_CHANNEL = 0,
98 GCM_NETWORK_CHANNEL = 1
99 };
100
96 bool IsReadyToStart(); 101 bool IsReadyToStart();
97 bool IsStarted(); 102 bool IsStarted();
98 103
99 void StartInvalidator(); 104 void StartInvalidator(InvalidationNetworkChannel network_channel);
100 void UpdateInvalidatorCredentials(); 105 void UpdateInvalidatorCredentials();
101 void StopInvalidator(); 106 void StopInvalidator();
102 void Logout(); 107 void Logout();
103 108
104 Profile *const profile_; 109 Profile *const profile_;
105 SigninManagerBase *const signin_manager_; 110 SigninManagerBase *const signin_manager_;
106 ProfileOAuth2TokenService *const oauth2_token_service_; 111 ProfileOAuth2TokenService *const oauth2_token_service_;
107 112
108 scoped_ptr<syncer::InvalidatorRegistrar> invalidator_registrar_; 113 scoped_ptr<syncer::InvalidatorRegistrar> invalidator_registrar_;
109 scoped_ptr<InvalidatorStorage> invalidator_storage_; 114 scoped_ptr<InvalidatorStorage> invalidator_storage_;
(...skipping 10 matching lines...) Expand all
120 scoped_ptr<OAuth2TokenService::Request> access_token_request_; 125 scoped_ptr<OAuth2TokenService::Request> access_token_request_;
121 base::OneShotTimer<TiclInvalidationService> request_access_token_retry_timer_; 126 base::OneShotTimer<TiclInvalidationService> request_access_token_retry_timer_;
122 net::BackoffEntry request_access_token_backoff_; 127 net::BackoffEntry request_access_token_backoff_;
123 128
124 DISALLOW_COPY_AND_ASSIGN(TiclInvalidationService); 129 DISALLOW_COPY_AND_ASSIGN(TiclInvalidationService);
125 }; 130 };
126 131
127 } // namespace invalidation 132 } // namespace invalidation
128 133
129 #endif // CHROME_BROWSER_INVALIDATION_TICL_INVALIDATION_SERVICE_H_ 134 #endif // CHROME_BROWSER_INVALIDATION_TICL_INVALIDATION_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/invalidation/ticl_invalidation_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698