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 <stdint.h> | 10 #include <stdint.h> |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 class BackgroundSyncControllerImpl : public content::BackgroundSyncController, | 26 class BackgroundSyncControllerImpl : public content::BackgroundSyncController, |
27 public KeyedService { | 27 public KeyedService { |
28 public: | 28 public: |
29 static const char kFieldTrialName[]; | 29 static const char kFieldTrialName[]; |
30 static const char kDisabledParameterName[]; | 30 static const char kDisabledParameterName[]; |
31 static const char kMaxAttemptsParameterName[]; | 31 static const char kMaxAttemptsParameterName[]; |
32 static const char kInitialRetryParameterName[]; | 32 static const char kInitialRetryParameterName[]; |
33 static const char kRetryDelayFactorParameterName[]; | 33 static const char kRetryDelayFactorParameterName[]; |
34 static const char kMinSyncRecoveryTimeName[]; | 34 static const char kMinSyncRecoveryTimeName[]; |
| 35 static const char kMaxSyncEventDurationName[]; |
35 | 36 |
36 explicit BackgroundSyncControllerImpl(Profile* profile); | 37 explicit BackgroundSyncControllerImpl(Profile* profile); |
37 ~BackgroundSyncControllerImpl() override; | 38 ~BackgroundSyncControllerImpl() override; |
38 | 39 |
39 // content::BackgroundSyncController overrides. | 40 // content::BackgroundSyncController overrides. |
40 void GetParameterOverrides( | 41 void GetParameterOverrides( |
41 content::BackgroundSyncParameters* parameters) const override; | 42 content::BackgroundSyncParameters* parameters) const override; |
42 void NotifyBackgroundSyncRegistered(const GURL& origin) override; | 43 void NotifyBackgroundSyncRegistered(const GURL& origin) override; |
43 void RunInBackground(bool enabled, int64_t min_ms) override; | 44 void RunInBackground(bool enabled, int64_t min_ms) override; |
44 | 45 |
45 protected: | 46 protected: |
46 // Virtual for testing. | 47 // Virtual for testing. |
47 virtual rappor::RapporService* GetRapporService(); | 48 virtual rappor::RapporService* GetRapporService(); |
48 | 49 |
49 private: | 50 private: |
50 Profile* profile_; // This object is owned by profile_. | 51 Profile* profile_; // This object is owned by profile_. |
51 | 52 |
52 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncControllerImpl); | 53 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncControllerImpl); |
53 }; | 54 }; |
54 | 55 |
55 #endif // CHROME_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_CONTROLLER_IMPL_H_ | 56 #endif // CHROME_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_CONTROLLER_IMPL_H_ |
OLD | NEW |