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

Side by Side Diff: chrome/browser/webdata/web_data_service.h

Issue 10227014: Remove the very old code that migrated password data from the WebDataService to PasswordStore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Chromium settings and storage represent user-selected preferences and 5 // Chromium settings and storage represent user-selected preferences and
6 // information and MUST not be extracted, overwritten or modified except 6 // information and MUST not be extracted, overwritten or modified except
7 // through Chromium defined APIs. 7 // through Chromium defined APIs.
8 8
9 #ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ 9 #ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__
10 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ 10 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__
(...skipping 30 matching lines...) Expand all
41 class SkBitmap; 41 class SkBitmap;
42 class WebDatabase; 42 class WebDatabase;
43 43
44 namespace base { 44 namespace base {
45 class Thread; 45 class Thread;
46 } 46 }
47 47
48 namespace webkit { 48 namespace webkit {
49 namespace forms { 49 namespace forms {
50 struct FormField; 50 struct FormField;
51 struct PasswordForm;
52 } 51 }
53 } 52 }
54 53
55 namespace webkit_glue { 54 namespace webkit_glue {
56 struct WebIntentServiceData; 55 struct WebIntentServiceData;
57 } 56 }
58 57
59 //////////////////////////////////////////////////////////////////////////////// 58 ////////////////////////////////////////////////////////////////////////////////
60 // 59 //
61 // WebDataService is a generic data repository for meta data associated with 60 // WebDataService is a generic data repository for meta data associated with
(...skipping 10 matching lines...) Expand all
72 // 71 //
73 //////////////////////////////////////////////////////////////////////////////// 72 ////////////////////////////////////////////////////////////////////////////////
74 73
75 // 74 //
76 // Result types 75 // Result types
77 // 76 //
78 typedef enum { 77 typedef enum {
79 BOOL_RESULT = 1, // WDResult<bool> 78 BOOL_RESULT = 1, // WDResult<bool>
80 KEYWORDS_RESULT, // WDResult<WDKeywordsResult> 79 KEYWORDS_RESULT, // WDResult<WDKeywordsResult>
81 INT64_RESULT, // WDResult<int64> 80 INT64_RESULT, // WDResult<int64>
82 PASSWORD_RESULT, // WDResult<std::vector<PasswordForm*>>
83 #if defined(OS_WIN) 81 #if defined(OS_WIN)
84 PASSWORD_IE7_RESULT, // WDResult<IE7PasswordInfo> 82 PASSWORD_IE7_RESULT, // WDResult<IE7PasswordInfo>
85 #endif 83 #endif
86 WEB_APP_IMAGES, // WDResult<WDAppImagesResult> 84 WEB_APP_IMAGES, // WDResult<WDAppImagesResult>
87 TOKEN_RESULT, // WDResult<std::vector<std::string>> 85 TOKEN_RESULT, // WDResult<std::vector<std::string>>
88 AUTOFILL_VALUE_RESULT, // WDResult<std::vector<string16>> 86 AUTOFILL_VALUE_RESULT, // WDResult<std::vector<string16>>
89 AUTOFILL_CHANGES, // WDResult<std::vector<AutofillChange>> 87 AUTOFILL_CHANGES, // WDResult<std::vector<AutofillChange>>
90 AUTOFILL_PROFILE_RESULT, // WDResult<AutofillProfile> 88 AUTOFILL_PROFILE_RESULT, // WDResult<AutofillProfile>
91 AUTOFILL_PROFILES_RESULT, // WDResult<std::vector<AutofillProfile*>> 89 AUTOFILL_PROFILES_RESULT, // WDResult<std::vector<AutofillProfile*>>
92 AUTOFILL_CREDITCARD_RESULT, // WDResult<CreditCard> 90 AUTOFILL_CREDITCARD_RESULT, // WDResult<CreditCard>
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 // Set a token to use for a specified service. 421 // Set a token to use for a specified service.
424 void SetTokenForService(const std::string& service, 422 void SetTokenForService(const std::string& service,
425 const std::string& token); 423 const std::string& token);
426 424
427 // Remove all tokens stored in the web database. 425 // Remove all tokens stored in the web database.
428 void RemoveAllTokens(); 426 void RemoveAllTokens();
429 427
430 // Null on failure. Success is WDResult<std::vector<std::string> > 428 // Null on failure. Success is WDResult<std::vector<std::string> >
431 virtual Handle GetAllTokens(WebDataServiceConsumer* consumer); 429 virtual Handle GetAllTokens(WebDataServiceConsumer* consumer);
432 430
431 #if defined(OS_WIN)
433 ////////////////////////////////////////////////////////////////////////////// 432 //////////////////////////////////////////////////////////////////////////////
434 // 433 //
435 // Password manager 434 // IE7/8 Password Access (used by PasswordStoreWin - do not use elsewhere)
436 // NOTE: These methods are all deprecated; new clients should use
437 // PasswordStore. These are only still here because Windows is (temporarily)
438 // still using them for its PasswordStore implementation.
439 // 435 //
440 ////////////////////////////////////////////////////////////////////////////// 436 //////////////////////////////////////////////////////////////////////////////
441 437
442 // Adds |form| to the list of remembered password forms.
443 void AddLogin(const webkit::forms::PasswordForm& form);
444
445 // Updates the remembered password form.
446 void UpdateLogin(const webkit::forms::PasswordForm& form);
447
448 // Removes |form| from the list of remembered password forms.
449 void RemoveLogin(const webkit::forms::PasswordForm& form);
450
451 // Removes all logins created in the specified daterange
452 void RemoveLoginsCreatedBetween(const base::Time& delete_begin,
453 const base::Time& delete_end);
454
455 // Removes all logins created on or after the date passed in.
456 void RemoveLoginsCreatedAfter(const base::Time& delete_begin);
457
458 // Gets a list of password forms that match |form|.
459 // |consumer| will be notified when the request is done. The result is of
460 // type WDResult<std::vector<PasswordForm*>>.
461 // The result will be null on failure. The |consumer| owns all PasswordForm's.
462 Handle GetLogins(const webkit::forms::PasswordForm& form,
463 WebDataServiceConsumer* consumer);
464
465 // Gets the complete list of password forms that have not been blacklisted and
466 // are thus auto-fillable.
467 // |consumer| will be notified when the request is done. The result is of
468 // type WDResult<std::vector<PasswordForm*>>.
469 // The result will be null on failure. The |consumer| owns all PasswordForms.
470 Handle GetAutofillableLogins(WebDataServiceConsumer* consumer);
471
472 // Gets the complete list of password forms that have been blacklisted.
473 // |consumer| will be notified when the request is done. The result is of
474 // type WDResult<std::vector<PasswordForm*>>.
475 // The result will be null on failure. The |consumer| owns all PasswordForm's.
476 Handle GetBlacklistLogins(WebDataServiceConsumer* consumer);
477
478 #if defined(OS_WIN)
479 // Adds |info| to the list of imported passwords from ie7/ie8. 438 // Adds |info| to the list of imported passwords from ie7/ie8.
480 void AddIE7Login(const IE7PasswordInfo& info); 439 void AddIE7Login(const IE7PasswordInfo& info);
481 440
482 // Removes |info| from the list of imported passwords from ie7/ie8. 441 // Removes |info| from the list of imported passwords from ie7/ie8.
483 void RemoveIE7Login(const IE7PasswordInfo& info); 442 void RemoveIE7Login(const IE7PasswordInfo& info);
484 443
485 // Get the login matching the information in |info|. |consumer| will be 444 // Get the login matching the information in |info|. |consumer| will be
486 // notified when the request is done. The result is of type 445 // notified when the request is done. The result is of type
487 // WDResult<IE7PasswordInfo>. 446 // WDResult<IE7PasswordInfo>.
488 // If there is no match, the fields of the IE7PasswordInfo will be empty. 447 // If there is no match, the fields of the IE7PasswordInfo will be empty.
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 // 638 //
680 // Token Service. 639 // Token Service.
681 // 640 //
682 ////////////////////////////////////////////////////////////////////////////// 641 //////////////////////////////////////////////////////////////////////////////
683 642
684 void RemoveAllTokensImpl(GenericRequest<std::string>* request); 643 void RemoveAllTokensImpl(GenericRequest<std::string>* request);
685 void SetTokenForServiceImpl( 644 void SetTokenForServiceImpl(
686 GenericRequest2<std::string, std::string>* request); 645 GenericRequest2<std::string, std::string>* request);
687 void GetAllTokensImpl(GenericRequest<std::string>* request); 646 void GetAllTokensImpl(GenericRequest<std::string>* request);
688 647
648 #if defined(OS_WIN)
689 ////////////////////////////////////////////////////////////////////////////// 649 //////////////////////////////////////////////////////////////////////////////
690 // 650 //
691 // Password manager. 651 // Password manager.
692 // 652 //
693 ////////////////////////////////////////////////////////////////////////////// 653 //////////////////////////////////////////////////////////////////////////////
694 void AddLoginImpl(GenericRequest<webkit::forms::PasswordForm>* request);
695 void UpdateLoginImpl(GenericRequest<webkit::forms::PasswordForm>* request);
696 void RemoveLoginImpl(GenericRequest<webkit::forms::PasswordForm>* request);
697 void RemoveLoginsCreatedBetweenImpl(
698 GenericRequest2<base::Time, base::Time>* request);
699 void GetLoginsImpl(GenericRequest<webkit::forms::PasswordForm>* request);
700 void GetAutofillableLoginsImpl(WebDataRequest* request);
701 void GetBlacklistLoginsImpl(WebDataRequest* request);
702 #if defined(OS_WIN)
703 void AddIE7LoginImpl(GenericRequest<IE7PasswordInfo>* request); 654 void AddIE7LoginImpl(GenericRequest<IE7PasswordInfo>* request);
704 void RemoveIE7LoginImpl(GenericRequest<IE7PasswordInfo>* request); 655 void RemoveIE7LoginImpl(GenericRequest<IE7PasswordInfo>* request);
705 void GetIE7LoginImpl(GenericRequest<IE7PasswordInfo>* request); 656 void GetIE7LoginImpl(GenericRequest<IE7PasswordInfo>* request);
706 #endif // defined(OS_WIN) 657 #endif // defined(OS_WIN)
707 658
708 ////////////////////////////////////////////////////////////////////////////// 659 //////////////////////////////////////////////////////////////////////////////
709 // 660 //
710 // Autofill. 661 // Autofill.
711 // 662 //
712 ////////////////////////////////////////////////////////////////////////////// 663 //////////////////////////////////////////////////////////////////////////////
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 // result can be NULL, if no result is expected or if the database could 738 // result can be NULL, if no result is expected or if the database could
788 // not be opened. The result object is destroyed after this call. 739 // not be opened. The result object is destroyed after this call.
789 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, 740 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h,
790 const WDTypedResult* result) = 0; 741 const WDTypedResult* result) = 0;
791 742
792 protected: 743 protected:
793 virtual ~WebDataServiceConsumer() {} 744 virtual ~WebDataServiceConsumer() {}
794 }; 745 };
795 746
796 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ 747 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698