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

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

Issue 2960103002: Improve add to homescreen data fetcher unit tests. (Closed)
Patch Set: Consolidation, testing calling GetData callback after time out 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 189a4fba71c6b470ae93fc121cc85c666b3105ff..daffce9b1439c1c204a49a727aba4cf35ebff1b7 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