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

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

Issue 2960103002: Improve add to homescreen data fetcher unit tests. (Closed)
Patch Set: Created 3 years, 6 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.cc
diff --git a/chrome/browser/installable/installable_manager.cc b/chrome/browser/installable/installable_manager.cc
index 5bfa16bbf3b75ed932584d9bb9530bde71f35efd..c784c66cf8327bd3819483057c20800f1229567b 100644
--- a/chrome/browser/installable/installable_manager.cc
+++ b/chrome/browser/installable/installable_manager.cc
@@ -69,41 +69,12 @@ bool IsParamsForPwaCheck(const InstallableParams& params) {
DEFINE_WEB_CONTENTS_USER_DATA_KEY(InstallableManager);
-struct InstallableManager::ManifestProperty {
- InstallableStatusCode error = NO_ERROR_DETECTED;
- GURL url;
- content::Manifest manifest;
- bool fetched = false;
-};
-
-struct InstallableManager::ValidManifestProperty {
- InstallableStatusCode error = NO_ERROR_DETECTED;
- bool is_valid = false;
- bool fetched = false;
-};
-
-struct InstallableManager::ServiceWorkerProperty {
- InstallableStatusCode error = NO_ERROR_DETECTED;
- bool has_worker = false;
- bool is_waiting = false;
- bool fetched = false;
-};
-
-struct InstallableManager::IconProperty {
- IconProperty() :
- error(NO_ERROR_DETECTED), url(), icon(), fetched(false) { }
- IconProperty(IconProperty&& other) = default;
- IconProperty& operator=(IconProperty&& other) = default;
-
- InstallableStatusCode error = NO_ERROR_DETECTED;
- GURL url;
- std::unique_ptr<SkBitmap> icon;
- bool fetched;
-
- private:
- // This class contains a std::unique_ptr and therefore must be move-only.
- DISALLOW_COPY_AND_ASSIGN(IconProperty);
-};
+InstallableManager::IconProperty::IconProperty()
+ : error(NO_ERROR_DETECTED), url(), icon(), fetched(false) {}
+
+InstallableManager::IconProperty::IconProperty(IconProperty&& other) = default;
+
+InstallableManager::IconProperty::~IconProperty() {}
InstallableManager::InstallableManager(content::WebContents* web_contents)
: content::WebContentsObserver(web_contents),

Powered by Google App Engine
This is Rietveld 408576698