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

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 // Password manager
436 // NOTE: These methods are all deprecated; new clients should use 435 // NOTE: These methods are all deprecated; new clients should use
437 // PasswordStore. These are only still here because Windows is (temporarily) 436 // PasswordStore. These are only still here because Windows is (temporarily)
438 // still using them for its PasswordStore implementation. 437 // still using them for its PasswordStore implementation.
stuartmorgan 2012/04/26 08:06:13 Remove the NOTE, and change "Password manager" to
Mike Mammarella 2012/04/26 18:07:33 Done.
439 // 438 //
440 ////////////////////////////////////////////////////////////////////////////// 439 //////////////////////////////////////////////////////////////////////////////
441 440
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. 441 // Adds |info| to the list of imported passwords from ie7/ie8.
480 void AddIE7Login(const IE7PasswordInfo& info); 442 void AddIE7Login(const IE7PasswordInfo& info);
481 443
482 // Removes |info| from the list of imported passwords from ie7/ie8. 444 // Removes |info| from the list of imported passwords from ie7/ie8.
483 void RemoveIE7Login(const IE7PasswordInfo& info); 445 void RemoveIE7Login(const IE7PasswordInfo& info);
484 446
485 // Get the login matching the information in |info|. |consumer| will be 447 // Get the login matching the information in |info|. |consumer| will be
486 // notified when the request is done. The result is of type 448 // notified when the request is done. The result is of type
487 // WDResult<IE7PasswordInfo>. 449 // WDResult<IE7PasswordInfo>.
488 // If there is no match, the fields of the IE7PasswordInfo will be empty. 450 // 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 // 641 //
680 // Token Service. 642 // Token Service.
681 // 643 //
682 ////////////////////////////////////////////////////////////////////////////// 644 //////////////////////////////////////////////////////////////////////////////
683 645
684 void RemoveAllTokensImpl(GenericRequest<std::string>* request); 646 void RemoveAllTokensImpl(GenericRequest<std::string>* request);
685 void SetTokenForServiceImpl( 647 void SetTokenForServiceImpl(
686 GenericRequest2<std::string, std::string>* request); 648 GenericRequest2<std::string, std::string>* request);
687 void GetAllTokensImpl(GenericRequest<std::string>* request); 649 void GetAllTokensImpl(GenericRequest<std::string>* request);
688 650
651 #if defined(OS_WIN)
689 ////////////////////////////////////////////////////////////////////////////// 652 //////////////////////////////////////////////////////////////////////////////
690 // 653 //
691 // Password manager. 654 // Password manager.
692 // 655 //
693 ////////////////////////////////////////////////////////////////////////////// 656 //////////////////////////////////////////////////////////////////////////////
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); 657 void AddIE7LoginImpl(GenericRequest<IE7PasswordInfo>* request);
704 void RemoveIE7LoginImpl(GenericRequest<IE7PasswordInfo>* request); 658 void RemoveIE7LoginImpl(GenericRequest<IE7PasswordInfo>* request);
705 void GetIE7LoginImpl(GenericRequest<IE7PasswordInfo>* request); 659 void GetIE7LoginImpl(GenericRequest<IE7PasswordInfo>* request);
706 #endif // defined(OS_WIN) 660 #endif // defined(OS_WIN)
707 661
708 ////////////////////////////////////////////////////////////////////////////// 662 //////////////////////////////////////////////////////////////////////////////
709 // 663 //
710 // Autofill. 664 // Autofill.
711 // 665 //
712 ////////////////////////////////////////////////////////////////////////////// 666 //////////////////////////////////////////////////////////////////////////////
(...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 741 // 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. 742 // not be opened. The result object is destroyed after this call.
789 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, 743 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h,
790 const WDTypedResult* result) = 0; 744 const WDTypedResult* result) = 0;
791 745
792 protected: 746 protected:
793 virtual ~WebDataServiceConsumer() {} 747 virtual ~WebDataServiceConsumer() {}
794 }; 748 };
795 749
796 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ 750 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698