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

Unified Diff: chrome/browser/webdata/password_web_data_service_win.h

Issue 364343002: Kill WebDataService, move (WIN only) Password code into separate class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments and clean up Created 6 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/webdata/password_web_data_service_win.h
diff --git a/chrome/browser/webdata/password_web_data_service_win.h b/chrome/browser/webdata/password_web_data_service_win.h
new file mode 100644
index 0000000000000000000000000000000000000000..2c1701a048c9b22ac660dacd8180254260e411e4
--- /dev/null
+++ b/chrome/browser/webdata/password_web_data_service_win.h
@@ -0,0 +1,76 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_WEBDATA_PASSWORD_WEB_DATA_SERVICE_WIN_H_
+#define CHROME_BROWSER_WEBDATA_PASSWORD_WEB_DATA_SERVICE_WIN_H_
+
+#include <vector>
+
+#include "base/memory/ref_counted.h"
+#include "base/sequenced_task_runner_helpers.h"
+#include "components/webdata/common/web_data_results.h"
+#include "components/webdata/common/web_data_service_base.h"
+#include "components/webdata/common/web_data_service_consumer.h"
+#include "components/webdata/common/web_database.h"
+
+class GURL;
+struct IE7PasswordInfo;
+class Profile;
+class WebDatabaseService;
+
+namespace base {
+class Thread;
+}
+
+namespace content {
+class BrowserContext;
+}
+
+// PasswordWebDataService is used to access IE7/8 Password data stored in the
+// web database. All data is retrieved and archived in an asynchronous way.
+
+class WebDataServiceConsumer;
+
+class PasswordWebDataService : public WebDataServiceBase {
+ public:
+ // Retrieves a WebDataService for the given context.
+ static scoped_refptr<PasswordWebDataService> FromBrowserContext(
+ content::BrowserContext* context);
+
+ PasswordWebDataService(scoped_refptr<WebDatabaseService> wdbs,
+ const ProfileErrorCallback& callback);
+
+ // Adds |info| to the list of imported passwords from ie7/ie8.
+ void AddIE7Login(const IE7PasswordInfo& info);
+
+ // Removes |info| from the list of imported passwords from ie7/ie8.
+ void RemoveIE7Login(const IE7PasswordInfo& info);
+
+ // Gets the login matching the information in |info|. |consumer| will be
+ // notified when the request is done. The result is of type
+ // WDResult<IE7PasswordInfo>.
+ // If there is no match, the fields of the IE7PasswordInfo will be empty.
+ // All requests return a handle. The handle can be used to cancel the request.
+ Handle GetIE7Login(const IE7PasswordInfo& info,
+ WebDataServiceConsumer* consumer);
+
+ protected:
+ // For unit tests, passes a null callback.
+ PasswordWebDataService();
+
+ virtual ~PasswordWebDataService();
+
+ private:
+ // The following methods are only invoked on the DB thread.
+ WebDatabase::State AddIE7LoginImpl(const IE7PasswordInfo& info,
+ WebDatabase* db);
+ WebDatabase::State RemoveIE7LoginImpl(const IE7PasswordInfo& info,
+ WebDatabase* db);
+ scoped_ptr<WDTypedResult> GetIE7LoginImpl(const IE7PasswordInfo& info,
+ WebDatabase* db);
+
+ DISALLOW_COPY_AND_ASSIGN(PasswordWebDataService);
+};
+
+#endif // CHROME_BROWSER_WEBDATA_PASSWORD_WEB_DATA_SERVICE_WIN_H_
« no previous file with comments | « chrome/browser/sync/profile_sync_service_autofill_unittest.cc ('k') | chrome/browser/webdata/password_web_data_service_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698