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

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

Issue 2436833002: Send POST request to update WebAPK instead of PUT request (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | chrome/browser/android/webapk/webapk_installer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 134
135 // Sends request to WebAPK server to update a WebAPK. During a successful 135 // Sends request to WebAPK server to update a WebAPK. During a successful
136 // request the WebAPK server responds with the URL of the generated WebAPK. 136 // request the WebAPK server responds with the URL of the generated WebAPK.
137 // |webapk| is the proto to send to the WebAPK server. 137 // |webapk| is the proto to send to the WebAPK server.
138 void SendUpdateWebApkRequest(std::unique_ptr<webapk::WebApk> webapk_proto); 138 void SendUpdateWebApkRequest(std::unique_ptr<webapk::WebApk> webapk_proto);
139 139
140 // Sends a request to WebAPK server to create/update WebAPK. During a 140 // Sends a request to WebAPK server to create/update WebAPK. During a
141 // successful request the WebAPK server responds with the URL of the generated 141 // successful request the WebAPK server responds with the URL of the generated
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,
145 const GURL& server_url); 144 const GURL& server_url);
146 145
147 // Called with the URL of generated WebAPK and the package name that the 146 // Called with the URL of generated WebAPK and the package name that the
148 // WebAPK should be installed at. 147 // WebAPK should be installed at.
149 void OnGotWebApkDownloadUrl(const GURL& download_url, 148 void OnGotWebApkDownloadUrl(const GURL& download_url,
150 const std::string& package_name); 149 const std::string& package_name);
151 150
152 // Downloads the WebAPK from the given |download_url|. 151 // Downloads the WebAPK from the given |download_url|.
153 void DownloadWebApk(const base::FilePath& output_path, 152 void DownloadWebApk(const base::FilePath& output_path,
154 const GURL& download_url, 153 const GURL& download_url,
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // Points to the Java Object. 236 // Points to the Java Object.
238 base::android::ScopedJavaGlobalRef<jobject> java_ref_; 237 base::android::ScopedJavaGlobalRef<jobject> java_ref_;
239 238
240 // Used to get |weak_ptr_|. 239 // Used to get |weak_ptr_|.
241 base::WeakPtrFactory<WebApkInstaller> weak_ptr_factory_; 240 base::WeakPtrFactory<WebApkInstaller> weak_ptr_factory_;
242 241
243 DISALLOW_COPY_AND_ASSIGN(WebApkInstaller); 242 DISALLOW_COPY_AND_ASSIGN(WebApkInstaller);
244 }; 243 };
245 244
246 #endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALLER_H_ 245 #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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698