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

Side by Side Diff: chrome/browser/sync/glue/autofill_change_processor.cc

Issue 3825005: Fix syncing of sessions. Numerous changes have been made. Currently, the mode... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Rebased again Created 10 years, 2 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/sync/glue/autofill_change_processor.h" 5 #include "chrome/browser/sync/glue/autofill_change_processor.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 23 matching lines...) Expand all
34 DCHECK(web_database); 34 DCHECK(web_database);
35 DCHECK(error_handler); 35 DCHECK(error_handler);
36 DCHECK(personal_data); 36 DCHECK(personal_data);
37 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); 37 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
38 StartObserving(); 38 StartObserving();
39 } 39 }
40 40
41 void AutofillChangeProcessor::Observe(NotificationType type, 41 void AutofillChangeProcessor::Observe(NotificationType type,
42 const NotificationSource& source, 42 const NotificationSource& source,
43 const NotificationDetails& details) { 43 const NotificationDetails& details) {
44 LOG(INFO) << "Observed autofill change.";
45 // Ensure this notification came from our web database. 44 // Ensure this notification came from our web database.
46 WebDataService* wds = Source<WebDataService>(source).ptr(); 45 WebDataService* wds = Source<WebDataService>(source).ptr();
47 if (!wds || wds->GetDatabase() != web_database_) 46 if (!wds || wds->GetDatabase() != web_database_)
48 return; 47 return;
49 48
50 DCHECK(running()); 49 DCHECK(running());
51 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); 50 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
52 if (!observing_) 51 if (!observing_)
53 return; 52 return;
54 53
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 s->set_company_name(UTF16ToUTF8(profile.GetFieldText( 559 s->set_company_name(UTF16ToUTF8(profile.GetFieldText(
561 AutoFillType(COMPANY_NAME)))); 560 AutoFillType(COMPANY_NAME))));
562 s->set_phone_fax_whole_number(UTF16ToUTF8(profile.GetFieldText( 561 s->set_phone_fax_whole_number(UTF16ToUTF8(profile.GetFieldText(
563 AutoFillType(PHONE_FAX_WHOLE_NUMBER)))); 562 AutoFillType(PHONE_FAX_WHOLE_NUMBER))));
564 s->set_phone_home_whole_number(UTF16ToUTF8(profile.GetFieldText( 563 s->set_phone_home_whole_number(UTF16ToUTF8(profile.GetFieldText(
565 AutoFillType(PHONE_HOME_WHOLE_NUMBER)))); 564 AutoFillType(PHONE_HOME_WHOLE_NUMBER))));
566 node->SetAutofillSpecifics(autofill); 565 node->SetAutofillSpecifics(autofill);
567 } 566 }
568 567
569 } // namespace browser_sync 568 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sessions/session_service.cc ('k') | chrome/browser/sync/glue/session_change_processor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698