| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_FAKE_SERVER_INVALIDATION_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_FAKE_SERVER_INVALIDATION_SERVICE_H_ |
| 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_FAKE_SERVER_INVALIDATION_SERVICE_H_ | 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_FAKE_SERVER_INVALIDATION_SERVICE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "chrome/browser/signin/fake_profile_oauth2_token_service.h" | 12 #include "chrome/browser/signin/fake_profile_oauth2_token_service.h" |
| 13 #include "components/invalidation/invalidation_service.h" | 13 #include "components/invalidation/invalidation_service.h" |
| 14 #include "components/invalidation/invalidator_registrar.h" | 14 #include "components/invalidation/invalidator_registrar.h" |
| 15 #include "google_apis/gaia/fake_identity_provider.h" | 15 #include "google_apis/gaia/fake_identity_provider.h" |
| 16 #include "sync/internal_api/public/base/model_type.h" | 16 #include "sync/internal_api/public/base/model_type.h" |
| 17 #include "sync/test/fake_server/fake_server.h" | 17 #include "sync/test/fake_server/fake_server.h" |
| 18 | 18 |
| 19 namespace content { | |
| 20 class BrowserContext; | |
| 21 } | |
| 22 | |
| 23 namespace invalidation { | 19 namespace invalidation { |
| 24 class InvalidationLogger; | 20 class InvalidationLogger; |
| 25 } | 21 } |
| 26 | 22 |
| 27 namespace fake_server { | 23 namespace fake_server { |
| 28 | 24 |
| 29 // An InvalidationService that is used in conjunction with FakeServer. | 25 // An InvalidationService that is used in conjunction with FakeServer. |
| 30 class FakeServerInvalidationService : public invalidation::InvalidationService, | 26 class FakeServerInvalidationService : public invalidation::InvalidationService, |
| 31 public FakeServer::Observer { | 27 public FakeServer::Observer { |
| 32 public: | 28 public: |
| 33 FakeServerInvalidationService(); | 29 FakeServerInvalidationService(); |
| 34 virtual ~FakeServerInvalidationService(); | 30 virtual ~FakeServerInvalidationService(); |
| 35 | 31 |
| 36 static KeyedService* Build(content::BrowserContext* context); | |
| 37 | |
| 38 virtual void RegisterInvalidationHandler( | 32 virtual void RegisterInvalidationHandler( |
| 39 syncer::InvalidationHandler* handler) OVERRIDE; | 33 syncer::InvalidationHandler* handler) OVERRIDE; |
| 40 virtual void UpdateRegisteredInvalidationIds( | 34 virtual void UpdateRegisteredInvalidationIds( |
| 41 syncer::InvalidationHandler* handler, | 35 syncer::InvalidationHandler* handler, |
| 42 const syncer::ObjectIdSet& ids) OVERRIDE; | 36 const syncer::ObjectIdSet& ids) OVERRIDE; |
| 43 virtual void UnregisterInvalidationHandler( | 37 virtual void UnregisterInvalidationHandler( |
| 44 syncer::InvalidationHandler* handler) OVERRIDE; | 38 syncer::InvalidationHandler* handler) OVERRIDE; |
| 45 | 39 |
| 46 virtual syncer::InvalidatorState GetInvalidatorState() const OVERRIDE; | 40 virtual syncer::InvalidatorState GetInvalidatorState() const OVERRIDE; |
| 47 virtual std::string GetInvalidatorClientId() const OVERRIDE; | 41 virtual std::string GetInvalidatorClientId() const OVERRIDE; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 67 syncer::InvalidatorRegistrar invalidator_registrar_; | 61 syncer::InvalidatorRegistrar invalidator_registrar_; |
| 68 FakeProfileOAuth2TokenService token_service_; | 62 FakeProfileOAuth2TokenService token_service_; |
| 69 FakeIdentityProvider identity_provider_; | 63 FakeIdentityProvider identity_provider_; |
| 70 | 64 |
| 71 DISALLOW_COPY_AND_ASSIGN(FakeServerInvalidationService); | 65 DISALLOW_COPY_AND_ASSIGN(FakeServerInvalidationService); |
| 72 }; | 66 }; |
| 73 | 67 |
| 74 } // namespace fake_server | 68 } // namespace fake_server |
| 75 | 69 |
| 76 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_FAKE_SERVER_INVALIDATION_SERVICE
_H_ | 70 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_FAKE_SERVER_INVALIDATION_SERVICE
_H_ |
| OLD | NEW |