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

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

Issue 506047: Return a list of changed from WebDatabase::RemoveFormElementsAddedBetween() (Closed)
Patch Set: Remove unneeded include. Created 11 years 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
« no previous file with comments | « chrome/browser/webdata/autofill_entry.cc ('k') | chrome/browser/webdata/web_database.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #include "chrome/browser/webdata/web_data_service.h" 5 #include "chrome/browser/webdata/web_data_service.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/task.h" 8 #include "base/task.h"
9 #include "base/thread.h" 9 #include "base/thread.h"
10 #include "chrome/browser/webdata/autofill_change.h" 10 #include "chrome/browser/webdata/autofill_change.h"
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 new WDResult<std::vector<string16> >(AUTOFILL_VALUE_RESULT, 645 new WDResult<std::vector<string16> >(AUTOFILL_VALUE_RESULT,
646 values)); 646 values));
647 } 647 }
648 request->RequestComplete(); 648 request->RequestComplete();
649 } 649 }
650 650
651 void WebDataService::RemoveFormElementsAddedBetweenImpl( 651 void WebDataService::RemoveFormElementsAddedBetweenImpl(
652 GenericRequest2<Time, Time>* request) { 652 GenericRequest2<Time, Time>* request) {
653 InitializeDatabaseIfNecessary(); 653 InitializeDatabaseIfNecessary();
654 if (db_ && !request->IsCancelled()) { 654 if (db_ && !request->IsCancelled()) {
655 AutofillChangeList changes;
655 if (db_->RemoveFormElementsAddedBetween(request->GetArgument1(), 656 if (db_->RemoveFormElementsAddedBetween(request->GetArgument1(),
656 request->GetArgument2())) 657 request->GetArgument2(),
658 &changes))
657 ScheduleCommit(); 659 ScheduleCommit();
658 } 660 }
659 request->RequestComplete(); 661 request->RequestComplete();
660 } 662 }
661 663
662 void WebDataService::RemoveFormValueForElementNameImpl( 664 void WebDataService::RemoveFormValueForElementNameImpl(
663 GenericRequest2<string16, string16>* request) { 665 GenericRequest2<string16, string16>* request) {
664 InitializeDatabaseIfNecessary(); 666 InitializeDatabaseIfNecessary();
665 if (db_ && !request->IsCancelled()) { 667 if (db_ && !request->IsCancelled()) {
666 const string16& name = request->GetArgument1(); 668 const string16& name = request->GetArgument1();
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 Task* t = NewRunnableMethod(s, 779 Task* t = NewRunnableMethod(s,
778 &WebDataService::RequestCompleted, 780 &WebDataService::RequestCompleted,
779 handle_); 781 handle_);
780 message_loop_->PostTask(FROM_HERE, t); 782 message_loop_->PostTask(FROM_HERE, t);
781 } 783 }
782 784
783 int WebDataService::GetNextRequestHandle() { 785 int WebDataService::GetNextRequestHandle() {
784 AutoLock l(pending_lock_); 786 AutoLock l(pending_lock_);
785 return ++next_request_handle_; 787 return ++next_request_handle_;
786 } 788 }
OLDNEW
« no previous file with comments | « chrome/browser/webdata/autofill_entry.cc ('k') | chrome/browser/webdata/web_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698