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_H_ | 5 #ifndef CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_REGISTRATION_H_ |
6 #define CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_REGISTRATION_H_ | 6 #define CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_REGISTRATION_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <list> | 10 #include <list> |
| 11 #include <memory> |
11 | 12 |
12 #include "base/callback.h" | 13 #include "base/callback.h" |
13 #include "base/macros.h" | 14 #include "base/macros.h" |
14 #include "base/memory/scoped_ptr.h" | |
15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
16 #include "content/browser/background_sync/background_sync.pb.h" | 16 #include "content/browser/background_sync/background_sync.pb.h" |
17 #include "content/browser/background_sync/background_sync_registration_options.h
" | 17 #include "content/browser/background_sync/background_sync_registration_options.h
" |
18 #include "content/common/background_sync_service.mojom.h" | 18 #include "content/common/background_sync_service.mojom.h" |
19 #include "content/common/content_export.h" | 19 #include "content/common/content_export.h" |
20 #include "mojo/public/cpp/bindings/type_converter.h" | 20 #include "mojo/public/cpp/bindings/type_converter.h" |
21 | 21 |
22 namespace content { | 22 namespace content { |
23 | 23 |
24 class CONTENT_EXPORT BackgroundSyncRegistration { | 24 class CONTENT_EXPORT BackgroundSyncRegistration { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 int num_attempts_ = 0; | 61 int num_attempts_ = 0; |
62 base::Time delay_until_; | 62 base::Time delay_until_; |
63 }; | 63 }; |
64 | 64 |
65 } // namespace content | 65 } // namespace content |
66 | 66 |
67 namespace mojo { | 67 namespace mojo { |
68 | 68 |
69 template <> | 69 template <> |
70 struct CONTENT_EXPORT | 70 struct CONTENT_EXPORT |
71 TypeConverter<scoped_ptr<content::BackgroundSyncRegistration>, | 71 TypeConverter<std::unique_ptr<content::BackgroundSyncRegistration>, |
72 content::mojom::SyncRegistrationPtr> { | 72 content::mojom::SyncRegistrationPtr> { |
73 static scoped_ptr<content::BackgroundSyncRegistration> Convert( | 73 static std::unique_ptr<content::BackgroundSyncRegistration> Convert( |
74 const content::mojom::SyncRegistrationPtr& input); | 74 const content::mojom::SyncRegistrationPtr& input); |
75 }; | 75 }; |
76 | 76 |
77 template <> | 77 template <> |
78 struct CONTENT_EXPORT TypeConverter<content::mojom::SyncRegistrationPtr, | 78 struct CONTENT_EXPORT TypeConverter<content::mojom::SyncRegistrationPtr, |
79 content::BackgroundSyncRegistration> { | 79 content::BackgroundSyncRegistration> { |
80 static content::mojom::SyncRegistrationPtr Convert( | 80 static content::mojom::SyncRegistrationPtr Convert( |
81 const content::BackgroundSyncRegistration& input); | 81 const content::BackgroundSyncRegistration& input); |
82 }; | 82 }; |
83 | 83 |
84 } // namespace | 84 } // namespace |
85 | 85 |
86 #endif // CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_REGISTRATION_H_ | 86 #endif // CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_REGISTRATION_H_ |
OLD | NEW |