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..10878dc7008cb887831d4de7b13f0cbe1157cb07 |
--- /dev/null |
+++ b/chrome/browser/webdata/password_web_data_service_win.h |
@@ -0,0 +1,90 @@ |
+// 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. |
+ |
+// Chromium settings and storage represent user-selected preferences and |
+// information and MUST not be extracted, overwritten or modified except |
+// through Chromium defined APIs. |
Peter Kasting
2014/07/07 23:20:03
Nit: This comment seems kinda random and unhelpful
Cait (Slow)
2014/07/09 15:23:16
Done.
|
+ |
+#ifndef CHROME_BROWSER_WEBDATA_PASSWORD_WEB_DATA_SERVICE_WIN_H_ |
Peter Kasting
2014/07/07 23:20:03
Nit: Extra space (2 places)
Cait (Slow)
2014/07/09 15:23:16
Done.
|
+#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; |
+} |
+ |
+//////////////////////////////////////////////////////////////////////////////// |
Peter Kasting
2014/07/07 23:20:03
Nit: The big
///////
//
//
///////
...comment f
Cait (Slow)
2014/07/09 15:23:16
Done.
|
+// |
+// PasswordWebDataService is used to access IE7/8 Password data stored in the |
+// web database. All data is retrieved and archived in an asynchronous way. |
+// |
+// All requests return a handle. The handle can be used to cancel the request. |
Peter Kasting
2014/07/07 23:20:03
Nit: This information seems like it belongs, if an
Cait (Slow)
2014/07/09 15:23:16
Done.
|
+// |
+//////////////////////////////////////////////////////////////////////////////// |
+ |
+class WebDataServiceConsumer; |
+ |
+class PasswordWebDataService : public WebDataServiceBase { |
+ public: |
+ // Retrieve a WebDataService for the given context. |
Peter Kasting
2014/07/07 23:20:03
Nit: Retrieves
Cait (Slow)
2014/07/09 15:23:16
Done.
|
+ 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); |
+ |
+ // Get the login matching the information in |info|. |consumer| will be |
Peter Kasting
2014/07/07 23:20:03
Nit: Gets
Cait (Slow)
2014/07/09 15:23:15
Done.
|
+ // 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. |
+ Handle GetIE7Login(const IE7PasswordInfo& info, |
+ WebDataServiceConsumer* consumer); |
+ |
+ protected: |
+ // For unit tests, passes a null callback. |
+ PasswordWebDataService(); |
+ |
+ virtual ~PasswordWebDataService(); |
+ |
+ private: |
+ ////////////////////////////////////////////////////////////////////////////// |
Peter Kasting
2014/07/07 23:20:03
Nit: Similarly, I'd remove the frame here and the
Cait (Slow)
2014/07/09 15:23:16
Done.
|
+ // |
+ // 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_ |