| 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_
|
|
|