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

Unified Diff: components/password_manager/core/browser/form_fetcher.h

Issue 2754043002: Introduce FormFetcher::Clone (Closed)
Patch Set: Fix stats test 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: components/password_manager/core/browser/form_fetcher.h
diff --git a/components/password_manager/core/browser/form_fetcher.h b/components/password_manager/core/browser/form_fetcher.h
index e2e16423c7f3f00ca91e695a7e957b211ea4b301..4c587d0a4502e47e58397e29e340ba76119e6358 100644
--- a/components/password_manager/core/browser/form_fetcher.h
+++ b/components/password_manager/core/browser/form_fetcher.h
@@ -74,6 +74,11 @@ class FormFetcher {
// of the cached credentials.
virtual void Fetch() = 0;
+ // Creates a copy of |*this| with contains the same credentials without the
+ // need for calling Fetch(). Only call this if GetState() returns NOT_WAITING,
+ // otherwise the original FormFetcher does not have any data to be cloned.
+ virtual std::unique_ptr<FormFetcher> Clone() = 0;
+
private:
DISALLOW_COPY_AND_ASSIGN(FormFetcher);
};

Powered by Google App Engine
This is Rietveld 408576698