| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_profile_change_processor.h" | 5 #include "chrome/browser/sync/glue/autofill_profile_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" |
| 11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
| 12 #include "chrome/browser/autofill/autofill_profile.h" | 12 #include "chrome/browser/autofill/autofill_profile.h" |
| 13 #include "chrome/browser/autofill/personal_data_manager.h" | 13 #include "chrome/browser/autofill/personal_data_manager.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 37 personal_data_(personal_data_manager) { | 37 personal_data_(personal_data_manager) { |
| 38 DCHECK(model_associator); | 38 DCHECK(model_associator); |
| 39 DCHECK(web_database); | 39 DCHECK(web_database); |
| 40 DCHECK(error_handler); | 40 DCHECK(error_handler); |
| 41 DCHECK(personal_data_manager); | 41 DCHECK(personal_data_manager); |
| 42 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); | 42 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); |
| 43 | 43 |
| 44 StartObserving(); | 44 StartObserving(); |
| 45 } | 45 } |
| 46 | 46 |
| 47 AutofillProfileChangeProcessor::~AutofillProfileChangeProcessor() {} |
| 48 |
| 47 AutofillProfileChangeProcessor::ScopedStopObserving::ScopedStopObserving( | 49 AutofillProfileChangeProcessor::ScopedStopObserving::ScopedStopObserving( |
| 48 AutofillProfileChangeProcessor* processor) { | 50 AutofillProfileChangeProcessor* processor) { |
| 49 processor_ = processor; | 51 processor_ = processor; |
| 50 processor_->StopObserving(); | 52 processor_->StopObserving(); |
| 51 } | 53 } |
| 52 | 54 |
| 53 AutofillProfileChangeProcessor::ScopedStopObserving::~ScopedStopObserving() { | 55 AutofillProfileChangeProcessor::ScopedStopObserving::~ScopedStopObserving() { |
| 54 processor_->StartObserving(); | 56 processor_->StartObserving(); |
| 55 } | 57 } |
| 56 | 58 |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 AutoFillType(COMPANY_NAME)))); | 334 AutoFillType(COMPANY_NAME)))); |
| 333 specifics.set_phone_fax_whole_number(UTF16ToUTF8(profile.GetFieldText( | 335 specifics.set_phone_fax_whole_number(UTF16ToUTF8(profile.GetFieldText( |
| 334 AutoFillType(PHONE_FAX_WHOLE_NUMBER)))); | 336 AutoFillType(PHONE_FAX_WHOLE_NUMBER)))); |
| 335 specifics.set_phone_home_whole_number(UTF16ToUTF8(profile.GetFieldText( | 337 specifics.set_phone_home_whole_number(UTF16ToUTF8(profile.GetFieldText( |
| 336 AutoFillType(PHONE_HOME_WHOLE_NUMBER)))); | 338 AutoFillType(PHONE_HOME_WHOLE_NUMBER)))); |
| 337 node->SetAutofillProfileSpecifics(specifics); | 339 node->SetAutofillProfileSpecifics(specifics); |
| 338 } | 340 } |
| 339 | 341 |
| 340 } // namespace browser_sync | 342 } // namespace browser_sync |
| 341 | 343 |
| OLD | NEW |