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 CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_REGISTRATION_OPTIONS_H_ | 5 #ifndef CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_REGISTRATION_OPTIONS_H_ |
6 #define CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_REGISTRATION_OPTIONS_H_ | 6 #define CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_REGISTRATION_OPTIONS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "content/browser/background_sync/background_sync.pb.h" | 11 #include "content/browser/background_sync/background_sync.pb.h" |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 | 15 |
16 // The options passed to BackgroundSyncManager::Registration. | 16 // The options passed to BackgroundSyncManager::Registration. |
17 struct CONTENT_EXPORT BackgroundSyncRegistrationOptions { | 17 struct CONTENT_EXPORT BackgroundSyncRegistrationOptions { |
18 BackgroundSyncRegistrationOptions(); | 18 BackgroundSyncRegistrationOptions(); |
19 bool Equals(const BackgroundSyncRegistrationOptions& other) const; | 19 bool Equals(const BackgroundSyncRegistrationOptions& other) const; |
20 | 20 |
21 std::string tag; | 21 std::string tag; |
22 int64_t min_period; | 22 int64_t min_period = 0; |
23 SyncNetworkState network_state; | 23 SyncNetworkState network_state = NETWORK_STATE_ONLINE; |
24 SyncPowerState power_state; | 24 SyncPowerState power_state = POWER_STATE_AVOID_DRAINING; |
25 SyncPeriodicity periodicity; | 25 SyncPeriodicity periodicity = SYNC_ONE_SHOT; |
26 }; | 26 }; |
27 | 27 |
28 } // namespace content | 28 } // namespace content |
29 | 29 |
30 #endif // CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_REGISTRATION_OPTIONS_
H_ | 30 #endif // CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_REGISTRATION_OPTIONS_
H_ |
OLD | NEW |