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" |
11 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
12 | 12 |
13 namespace rappor { | 13 namespace rappor { |
14 class RapporService; | 14 class RapporService; |
15 } | 15 } |
16 | 16 |
17 class Profile; | 17 class Profile; |
18 | 18 |
19 class BackgroundSyncControllerImpl : public content::BackgroundSyncController, | 19 class BackgroundSyncControllerImpl : public content::BackgroundSyncController, |
20 public KeyedService { | 20 public KeyedService { |
21 public: | 21 public: |
22 explicit BackgroundSyncControllerImpl(Profile* profile); | 22 explicit BackgroundSyncControllerImpl(Profile* profile); |
23 ~BackgroundSyncControllerImpl() override; | 23 ~BackgroundSyncControllerImpl() override; |
24 | 24 |
25 // content::BackgroundSyncController overrides. | 25 // content::BackgroundSyncController overrides. |
26 void NotifyBackgroundSyncRegistered(const GURL& origin) override; | 26 void NotifyBackgroundSyncRegistered(const GURL& origin) override; |
27 | 27 |
| 28 #if defined(OS_ANDROID) |
| 29 void LaunchBrowserWhenNextOnline( |
| 30 const content::BackgroundSyncManager* registrant, |
| 31 bool launch_when_next_online) override; |
| 32 #endif |
| 33 |
28 protected: | 34 protected: |
29 // Virtual for testing. | 35 // Virtual for testing. |
30 virtual rappor::RapporService* GetRapporService(); | 36 virtual rappor::RapporService* GetRapporService(); |
31 | 37 |
32 private: | 38 private: |
33 Profile* profile_; // This object is owned by profile_. | 39 Profile* profile_; // This object is owned by profile_. |
34 | 40 |
35 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncControllerImpl); | 41 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncControllerImpl); |
36 }; | 42 }; |
37 | 43 |
38 #endif // CHROME_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_CONTROLLER_IMPL_H_ | 44 #endif // CHROME_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_CONTROLLER_IMPL_H_ |
OLD | NEW |