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

Unified 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: Nits. Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/webapk/webapk_installer.h
diff --git a/chrome/browser/android/webapk/webapk_installer.h b/chrome/browser/android/webapk/webapk_installer.h
index eb24f5b2ce428e14f5fb30f19b64f6a1de3fc09b..91706d0d2260116930a317f861ec9245006deeb8 100644
--- a/chrome/browser/android/webapk/webapk_installer.h
+++ b/chrome/browser/android/webapk/webapk_installer.h
@@ -38,6 +38,12 @@ class WebApkIconHasher;
// Java WebApkInstaller counterpart.
class WebApkInstaller : public net::URLFetcherDelegate {
public:
+ enum TaskType {
dominickn 2016/09/27 03:16:24 Nit: is this enum going to be used outside of the
Xi Han 2016/09/27 12:55:13 This enum is used by CreateSubDirAndSetPermissions
dominickn 2016/09/28 00:56:28 It looks like task_type is only used in CreateSubD
Xi Han 2016/09/28 01:54:24 Done.
+ UNDEFINED,
+ INSTALL,
+ UPDATE,
+ };
+
// Called when the creation/updating of a WebAPK is finished or failed.
// Parameters:
// - whether the process succeeds.
@@ -109,12 +115,6 @@ class WebApkInstaller : public net::URLFetcherDelegate {
void OnSuccess();
private:
- enum TaskType {
- UNDEFINED,
- INSTALL,
- UPDATE,
- };
-
// Create the Java object.
void CreateJavaRef();
@@ -149,6 +149,11 @@ class WebApkInstaller : public net::URLFetcherDelegate {
void OnGotWebApkDownloadUrl(const GURL& download_url,
const std::string& package_name);
+ // Called once the sub directory to store the downloaded WebAPK was
+ // created with permissions set properly or if creation failed.
+ void OnCreatedSubDirAndSetPermissions(const GURL& download_url,
+ const base::FilePath& file_path);
+
// Called once the WebAPK has been downloaded. Makes the downloaded WebAPK
// world readable and installs the WebAPK if the download was successful.
// |file_path| is the file path that the WebAPK was downloaded to.
« 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