OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_ANDROID_WEBAPK_WEBAPK_INSTALL_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALL_SERVICE_H_ |
6 #define CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALL_SERVICE_H_ | 6 #define CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALL_SERVICE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 struct ShortcutInfo; | 22 struct ShortcutInfo; |
23 class SkBitmap; | 23 class SkBitmap; |
24 | 24 |
25 // A Java counterpart will be generated for this enum. | 25 // A Java counterpart will be generated for this enum. |
26 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.webapps | 26 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.webapps |
27 enum class WebApkInstallResult { | 27 enum class WebApkInstallResult { |
28 SUCCESS = 0, | 28 SUCCESS = 0, |
29 FAILURE = 1, | 29 FAILURE = 1, |
30 // An install was initiated but it timed out. We did not get a response from | 30 // An install was initiated but it timed out. We did not get a response from |
31 // Google Play (or the Android OS in the case of the "unknown sources" flow) | 31 // the install service so it is possible that the install will complete some |
32 // so it is possible that the install will complete some time in the future. | 32 // time in the future. |
33 PROBABLE_FAILURE = 2 | 33 PROBABLE_FAILURE = 2 |
34 }; | 34 }; |
35 | 35 |
36 // Service which talks to Chrome WebAPK server and Google Play to generate a | 36 // Service which talks to Chrome WebAPK server and Google Play to generate a |
37 // WebAPK on the server, download it, and install it. | 37 // WebAPK on the server, download it, and install it. |
38 class WebApkInstallService : public KeyedService { | 38 class WebApkInstallService : public KeyedService { |
39 public: | 39 public: |
40 // Called when the creation/updating of a WebAPK is finished or failed. | 40 // Called when the creation/updating of a WebAPK is finished or failed. |
41 // Parameters: | 41 // Parameters: |
42 // - the result of the installation. | 42 // - the result of the installation. |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 // In progress installs. | 86 // In progress installs. |
87 std::set<GURL> installs_; | 87 std::set<GURL> installs_; |
88 | 88 |
89 // Used to get |weak_ptr_|. | 89 // Used to get |weak_ptr_|. |
90 base::WeakPtrFactory<WebApkInstallService> weak_ptr_factory_; | 90 base::WeakPtrFactory<WebApkInstallService> weak_ptr_factory_; |
91 | 91 |
92 DISALLOW_COPY_AND_ASSIGN(WebApkInstallService); | 92 DISALLOW_COPY_AND_ASSIGN(WebApkInstallService); |
93 }; | 93 }; |
94 | 94 |
95 #endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALL_SERVICE_H_ | 95 #endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALL_SERVICE_H_ |
OLD | NEW |