| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_BACKGROUND_SYNC_BACKGROUND_SYNC_CONTROLLER_IMPL_H_ | 5 #ifndef CHROME_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_CONTROLLER_IMPL_H_ |
| 6 #define CHROME_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_CONTROLLER_IMPL_H_ | 6 #define CHROME_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_CONTROLLER_IMPL_H_ |
| 7 | 7 |
| 8 #include "content/public/browser/background_sync_controller.h" | 8 #include "content/public/browser/background_sync_controller.h" |
| 9 | 9 |
| 10 #include "components/keyed_service/core/keyed_service.h" | 10 #include "components/keyed_service/core/keyed_service.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 class BackgroundSyncControllerImpl : public content::BackgroundSyncController, | 23 class BackgroundSyncControllerImpl : public content::BackgroundSyncController, |
| 24 public KeyedService { | 24 public KeyedService { |
| 25 public: | 25 public: |
| 26 static const char kFieldTrialName[]; | 26 static const char kFieldTrialName[]; |
| 27 static const char kDisabledParameterName[]; | 27 static const char kDisabledParameterName[]; |
| 28 static const char kMaxAttemptsParameterName[]; | 28 static const char kMaxAttemptsParameterName[]; |
| 29 static const char kInitialRetryParameterName[]; | 29 static const char kInitialRetryParameterName[]; |
| 30 static const char kRetryDelayFactorParameterName[]; | 30 static const char kRetryDelayFactorParameterName[]; |
| 31 static const char kMinSyncRecoveryTimeName[]; | 31 static const char kMinSyncRecoveryTimeName[]; |
| 32 static const char kMaxSyncEventDuration[]; |
| 32 | 33 |
| 33 explicit BackgroundSyncControllerImpl(Profile* profile); | 34 explicit BackgroundSyncControllerImpl(Profile* profile); |
| 34 ~BackgroundSyncControllerImpl() override; | 35 ~BackgroundSyncControllerImpl() override; |
| 35 | 36 |
| 36 // content::BackgroundSyncController overrides. | 37 // content::BackgroundSyncController overrides. |
| 37 void GetParameterOverrides( | 38 void GetParameterOverrides( |
| 38 content::BackgroundSyncParameters* parameters) const override; | 39 content::BackgroundSyncParameters* parameters) const override; |
| 39 void NotifyBackgroundSyncRegistered(const GURL& origin) override; | 40 void NotifyBackgroundSyncRegistered(const GURL& origin) override; |
| 40 void RunInBackground(bool enabled, int64_t min_ms) override; | 41 void RunInBackground(bool enabled, int64_t min_ms) override; |
| 41 | 42 |
| 42 protected: | 43 protected: |
| 43 // Virtual for testing. | 44 // Virtual for testing. |
| 44 virtual rappor::RapporService* GetRapporService(); | 45 virtual rappor::RapporService* GetRapporService(); |
| 45 | 46 |
| 46 private: | 47 private: |
| 47 Profile* profile_; // This object is owned by profile_. | 48 Profile* profile_; // This object is owned by profile_. |
| 48 | 49 |
| 49 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncControllerImpl); | 50 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncControllerImpl); |
| 50 }; | 51 }; |
| 51 | 52 |
| 52 #endif // CHROME_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_CONTROLLER_IMPL_H_ | 53 #endif // CHROME_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_CONTROLLER_IMPL_H_ |
| OLD | NEW |