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

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

Issue 2364133002: Download WebAPK into a WebAPK-specifc directory, and delete all cached ones. (Closed)
Patch Set: dominickn@'s comments. Created 4 years, 2 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_INSTALLER_H_ 5 #ifndef CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALLER_H_
6 #define CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALLER_H_ 6 #define CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALLER_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // WebAPK. 142 // WebAPK.
143 void SendRequest(std::unique_ptr<webapk::WebApk> request_proto, 143 void SendRequest(std::unique_ptr<webapk::WebApk> request_proto,
144 net::URLFetcher::RequestType request_type, 144 net::URLFetcher::RequestType request_type,
145 const GURL& server_url); 145 const GURL& server_url);
146 146
147 // Called with the URL of generated WebAPK and the package name that the 147 // Called with the URL of generated WebAPK and the package name that the
148 // WebAPK should be installed at. 148 // WebAPK should be installed at.
149 void OnGotWebApkDownloadUrl(const GURL& download_url, 149 void OnGotWebApkDownloadUrl(const GURL& download_url,
150 const std::string& package_name); 150 const std::string& package_name);
151 151
152 // Called once the sub directory to store the downloaded WebAPK was
153 // created with permissions set properly or if creation failed.
154 void OnCreatedSubDirAndSetPermissions(const GURL& download_url,
155 const base::FilePath& file_path);
156
152 // Called once the WebAPK has been downloaded. Makes the downloaded WebAPK 157 // Called once the WebAPK has been downloaded. Makes the downloaded WebAPK
153 // world readable and installs the WebAPK if the download was successful. 158 // world readable and installs the WebAPK if the download was successful.
154 // |file_path| is the file path that the WebAPK was downloaded to. 159 // |file_path| is the file path that the WebAPK was downloaded to.
155 void OnWebApkDownloaded(const base::FilePath& file_path, 160 void OnWebApkDownloaded(const base::FilePath& file_path,
156 FileDownloader::Result result); 161 FileDownloader::Result result);
157 162
158 // Called once the downloaded WebAPK has been made world readable. Installs 163 // Called once the downloaded WebAPK has been made world readable. Installs
159 // the WebAPK. 164 // the WebAPK.
160 // |file_path| is the file path that the WebAPK was downloaded to. 165 // |file_path| is the file path that the WebAPK was downloaded to.
161 // |change_permission_success| is whether the WebAPK could be made world 166 // |change_permission_success| is whether the WebAPK could be made world
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 // Points to the Java Object. 228 // Points to the Java Object.
224 base::android::ScopedJavaGlobalRef<jobject> java_ref_; 229 base::android::ScopedJavaGlobalRef<jobject> java_ref_;
225 230
226 // Used to get |weak_ptr_|. 231 // Used to get |weak_ptr_|.
227 base::WeakPtrFactory<WebApkInstaller> weak_ptr_factory_; 232 base::WeakPtrFactory<WebApkInstaller> weak_ptr_factory_;
228 233
229 DISALLOW_COPY_AND_ASSIGN(WebApkInstaller); 234 DISALLOW_COPY_AND_ASSIGN(WebApkInstaller);
230 }; 235 };
231 236
232 #endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALLER_H_ 237 #endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/webapk/webapk_installer.cc » ('j') | chrome/browser/android/webapk/webapk_installer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698