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

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

Issue 3041007: AutoFill Prefs dialog on Mac should list derived labels for profiles, not summaries. (Closed)
Patch Set: Fixing unit tests. Created 10 years, 5 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
« no previous file with comments | « chrome/browser/autofill/autofill_dialog_controller_mac_unittest.mm ('k') | no next file » | 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/stl_util-inl.h" 8 #include "base/stl_util-inl.h"
9 #include "base/task.h" 9 #include "base/task.h"
10 #include "base/thread.h" 10 #include "base/thread.h"
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 } 863 }
864 } 864 }
865 request->RequestComplete(); 865 request->RequestComplete();
866 } 866 }
867 867
868 void WebDataService::AddAutoFillProfileImpl( 868 void WebDataService::AddAutoFillProfileImpl(
869 GenericRequest<AutoFillProfile>* request) { 869 GenericRequest<AutoFillProfile>* request) {
870 InitializeDatabaseIfNecessary(); 870 InitializeDatabaseIfNecessary();
871 if (db_ && !request->IsCancelled()) { 871 if (db_ && !request->IsCancelled()) {
872 const AutoFillProfile& profile = request->GetArgument(); 872 const AutoFillProfile& profile = request->GetArgument();
873 if (!db_->AddAutoFillProfile(profile)) 873 if (!db_->AddAutoFillProfile(profile)) {
874 NOTREACHED(); 874 NOTREACHED();
875 return;
876 }
875 ScheduleCommit(); 877 ScheduleCommit();
876 878
877 AutofillProfileChange change(AutofillProfileChange::ADD, 879 AutofillProfileChange change(AutofillProfileChange::ADD,
878 profile.Label(), &profile, string16()); 880 profile.Label(), &profile, string16());
879 NotificationService::current()->Notify( 881 NotificationService::current()->Notify(
880 NotificationType::AUTOFILL_PROFILE_CHANGED, 882 NotificationType::AUTOFILL_PROFILE_CHANGED,
881 Source<WebDataService>(this), 883 Source<WebDataService>(this),
882 Details<AutofillProfileChange>(&change)); 884 Details<AutofillProfileChange>(&change));
883 } 885 }
884 request->RequestComplete(); 886 request->RequestComplete();
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 return result_; 1077 return result_;
1076 } 1078 }
1077 1079
1078 void WebDataService::WebDataRequest::RequestComplete() { 1080 void WebDataService::WebDataRequest::RequestComplete() {
1079 WebDataService* s = service_; 1081 WebDataService* s = service_;
1080 Task* t = NewRunnableMethod(s, 1082 Task* t = NewRunnableMethod(s,
1081 &WebDataService::RequestCompleted, 1083 &WebDataService::RequestCompleted,
1082 handle_); 1084 handle_);
1083 message_loop_->PostTask(FROM_HERE, t); 1085 message_loop_->PostTask(FROM_HERE, t);
1084 } 1086 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_dialog_controller_mac_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698