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

Side by Side Diff: chrome/browser/installable/installable_manager.h

Issue 2791923005: Fails InstallableManager if a selected badge icon cannot be fetched. (Closed)
Patch Set: Correct the error of making badge icon required Created 3 years, 8 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_INSTALLABLE_INSTALLABLE_MANAGER_H_ 5 #ifndef CHROME_BROWSER_INSTALLABLE_INSTALLABLE_MANAGER_H_
6 #define CHROME_BROWSER_INSTALLABLE_INSTALLABLE_MANAGER_H_ 6 #define CHROME_BROWSER_INSTALLABLE_INSTALLABLE_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <tuple> 10 #include <tuple>
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 // Data retrieval methods. 191 // Data retrieval methods.
192 void FetchManifest(); 192 void FetchManifest();
193 void OnDidGetManifest(const GURL& manifest_url, 193 void OnDidGetManifest(const GURL& manifest_url,
194 const content::Manifest& manifest); 194 const content::Manifest& manifest);
195 195
196 void CheckInstallable(); 196 void CheckInstallable();
197 bool IsManifestValidForWebApp(const content::Manifest& manifest); 197 bool IsManifestValidForWebApp(const content::Manifest& manifest);
198 void CheckServiceWorker(); 198 void CheckServiceWorker();
199 void OnDidCheckHasServiceWorker(content::ServiceWorkerCapability capability); 199 void OnDidCheckHasServiceWorker(content::ServiceWorkerCapability capability);
200 200
201 void CheckAndFetchBestIcon(const IconParams& params); 201 void CheckAndFetchBestIcon(const IconParams& params, bool is_required);
202 void OnIconFetched( 202 void OnIconFetched(
203 const GURL icon_url, const IconParams& params, const SkBitmap& bitmap); 203 const GURL icon_url, const IconParams& params, const SkBitmap& bitmap);
204 204
205 // content::WebContentsObserver overrides 205 // content::WebContentsObserver overrides
206 void DidFinishNavigation(content::NavigationHandle* handle) override; 206 void DidFinishNavigation(content::NavigationHandle* handle) override;
207 void WebContentsDestroyed() override; 207 void WebContentsDestroyed() override;
208 208
209 const GURL& manifest_url() const; 209 const GURL& manifest_url() const;
210 const content::Manifest& manifest() const; 210 const content::Manifest& manifest() const;
211 bool is_installable() const; 211 bool is_installable() const;
212 212
213 // The list of <params, callback> pairs that have come from a call to GetData. 213 // The list of <params, callback> pairs that have come from a call to GetData.
214 std::vector<Task> tasks_; 214 std::vector<Task> tasks_;
215 215
216 // Installable properties cached on this object. 216 // Installable properties cached on this object.
217 std::unique_ptr<ManifestProperty> manifest_; 217 std::unique_ptr<ManifestProperty> manifest_;
218 std::unique_ptr<InstallableProperty> installable_; 218 std::unique_ptr<InstallableProperty> installable_;
219 std::map<IconParams, IconProperty> icons_; 219 std::map<IconParams, IconProperty> icons_;
220 220
221 bool is_active_; 221 bool is_active_;
222 222
223 base::WeakPtrFactory<InstallableManager> weak_factory_; 223 base::WeakPtrFactory<InstallableManager> weak_factory_;
224 224
225 DISALLOW_COPY_AND_ASSIGN(InstallableManager); 225 DISALLOW_COPY_AND_ASSIGN(InstallableManager);
226 }; 226 };
227 227
228 #endif // CHROME_BROWSER_INSTALLABLE_INSTALLABLE_MANAGER_H_ 228 #endif // CHROME_BROWSER_INSTALLABLE_INSTALLABLE_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/installable/installable_manager.cc » ('j') | chrome/browser/installable/installable_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698