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

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

Issue 2960103002: Improve add to homescreen data fetcher unit tests. (Closed)
Patch Set: Comments Created 3 years, 5 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 dfd105b1ec8152a7b3a075d065edb925ada4ee58..e0982df1022e58ef28b3634c6c32a9098e032dd9 100644
--- a/chrome/browser/installable/installable_manager.cc
+++ b/chrome/browser/installable/installable_manager.cc
@@ -69,40 +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 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