Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: chrome/browser/android/webapk/webapk_install_service.h

Issue 2943913002: [Android WebAPK] Make webapk_installer.cc return proto as base64 string
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
Xi Han 2017/06/19 17:14:14 Nit: you probably don't need this.
13 13
14 #include "base/callback.h" 14 #include "base/callback.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "base/strings/string16.h" 17 #include "base/strings/string16.h"
18 #include "components/keyed_service/core/keyed_service.h" 18 #include "components/keyed_service/core/keyed_service.h"
19 #include "url/gurl.h" 19 #include "url/gurl.h"
20 20
21 namespace content { 21 namespace content {
22 class BrowserContext; 22 class BrowserContext;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 const SkBitmap& primary_icon, 64 const SkBitmap& primary_icon,
65 const SkBitmap& badge_icon, 65 const SkBitmap& badge_icon,
66 const FinishCallback& finish_callback); 66 const FinishCallback& finish_callback);
67 67
68 // Talks to the Chrome WebAPK server to update a WebAPK on the server and to 68 // Talks to the Chrome WebAPK server to update a WebAPK on the server and to
69 // the Google Play server to install the downloaded WebAPK. Calls 69 // the Google Play server to install the downloaded WebAPK. Calls
70 // |finish_callback| once the update completed or failed. 70 // |finish_callback| once the update completed or failed.
71 void UpdateAsync(const std::string& webapk_package, 71 void UpdateAsync(const std::string& webapk_package,
72 const GURL& start_url, 72 const GURL& start_url,
73 const base::string16& short_name, 73 const base::string16& short_name,
74 std::unique_ptr<std::vector<uint8_t>> serialized_proto, 74 std::unique_ptr<std::string> serialized_proto,
75 const FinishCallback& finish_callback); 75 const FinishCallback& finish_callback);
76 76
77 private: 77 private:
78 // Called once the install/update completed or failed. 78 // Called once the install/update completed or failed.
79 void OnFinishedInstall(const GURL& web_manifest_url, 79 void OnFinishedInstall(const GURL& web_manifest_url,
80 const FinishCallback& finish_callback, 80 const FinishCallback& finish_callback,
81 WebApkInstallResult result, 81 WebApkInstallResult result,
82 bool relax_updates, 82 bool relax_updates,
83 const std::string& webapk_package_name); 83 const std::string& webapk_package_name);
84 84
85 content::BrowserContext* browser_context_; 85 content::BrowserContext* browser_context_;
86 86
87 // In progress installs. 87 // In progress installs.
88 std::set<GURL> installs_; 88 std::set<GURL> installs_;
89 89
90 // Used to get |weak_ptr_|. 90 // Used to get |weak_ptr_|.
91 base::WeakPtrFactory<WebApkInstallService> weak_ptr_factory_; 91 base::WeakPtrFactory<WebApkInstallService> weak_ptr_factory_;
92 92
93 DISALLOW_COPY_AND_ASSIGN(WebApkInstallService); 93 DISALLOW_COPY_AND_ASSIGN(WebApkInstallService);
94 }; 94 };
95 95
96 #endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALL_SERVICE_H_ 96 #endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALL_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698