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

Unified Diff: chrome/browser/installable/installable_manager.h

Issue 2751343002: Adds a basic offline check to InstallableManager. (Closed)
Patch Set: Created 3 years, 9 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/installable/installable_manager.h
diff --git a/chrome/browser/installable/installable_manager.h b/chrome/browser/installable/installable_manager.h
index 3f508141d707029e1b19e66b30ae8ffb3d2f9400..f0157f4d2764bd91c63577c4cf089a7571b942cb 100644
--- a/chrome/browser/installable/installable_manager.h
+++ b/chrome/browser/installable/installable_manager.h
@@ -16,6 +16,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/installable/installable_logging.h"
+#include "content/public/browser/service_worker_context.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"
#include "content/public/common/manifest.h"
@@ -91,9 +92,9 @@ struct InstallableData {
// using it.
const SkBitmap* badge_icon;
- // true if the site has a service worker and a viable web app manifest. If
- // check_installable was true and the site isn't installable, the reason will
- // be in error_code.
+ // true if the site has a service worker with a fetch handler and a viable web
+ // app manifest. If check_installable was true and the site isn't installable,
+ // the reason will be in error_code.
const bool is_installable;
};
@@ -195,7 +196,8 @@ class InstallableManager
void CheckInstallable();
bool IsManifestValidForWebApp(const content::Manifest& manifest);
void CheckServiceWorker();
- void OnDidCheckHasServiceWorker(bool has_service_worker);
+ void OnDidCheckServiceWorkerStatus(
+ content::ServiceWorkerStatus offline_capability);
dominickn 2017/03/16 06:21:56 Nit: call the variable status
piotrs 2017/03/17 02:21:37 Done.
void CheckAndFetchBestIcon(const IconParams& params);
void OnIconFetched(

Powered by Google App Engine
This is Rietveld 408576698