| OLD | NEW |
| 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 #include "chrome/browser/webdata/autofill_profile_syncable_service.h" | 5 #include "chrome/browser/webdata/autofill_profile_syncable_service.h" |
| 6 | 6 |
| 7 #include "base/guid.h" | 7 #include "base/guid.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 current_data.push_back(CreateData(*(i->second))); | 221 current_data.push_back(CreateData(*(i->second))); |
| 222 } | 222 } |
| 223 return current_data; | 223 return current_data; |
| 224 } | 224 } |
| 225 | 225 |
| 226 syncer::SyncError AutofillProfileSyncableService::ProcessSyncChanges( | 226 syncer::SyncError AutofillProfileSyncableService::ProcessSyncChanges( |
| 227 const tracked_objects::Location& from_here, | 227 const tracked_objects::Location& from_here, |
| 228 const syncer::SyncChangeList& change_list) { | 228 const syncer::SyncChangeList& change_list) { |
| 229 DCHECK(CalledOnValidThread()); | 229 DCHECK(CalledOnValidThread()); |
| 230 if (!sync_processor_.get()) { | 230 if (!sync_processor_.get()) { |
| 231 syncer::SyncError error(FROM_HERE, "Models not yet associated.", | 231 syncer::SyncError error(FROM_HERE, |
| 232 syncer::AUTOFILL_PROFILE); | 232 syncer::SyncError::DATATYPE_ERROR, |
| 233 "Models not yet associated.", |
| 234 syncer::AUTOFILL_PROFILE); |
| 233 return error; | 235 return error; |
| 234 } | 236 } |
| 235 | 237 |
| 236 DataBundle bundle; | 238 DataBundle bundle; |
| 237 | 239 |
| 238 for (syncer::SyncChangeList::const_iterator i = change_list.begin(); | 240 for (syncer::SyncChangeList::const_iterator i = change_list.begin(); |
| 239 i != change_list.end(); ++i) { | 241 i != change_list.end(); ++i) { |
| 240 DCHECK(i->IsValid()); | 242 DCHECK(i->IsValid()); |
| 241 switch (i->change_type()) { | 243 switch (i->change_type()) { |
| 242 case syncer::SyncChange::ACTION_ADD: | 244 case syncer::SyncChange::ACTION_ADD: |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 } | 614 } |
| 613 | 615 |
| 614 void AutofillProfileSyncableService::InjectStartSyncFlare( | 616 void AutofillProfileSyncableService::InjectStartSyncFlare( |
| 615 const syncer::SyncableService::StartSyncFlare& flare) { | 617 const syncer::SyncableService::StartSyncFlare& flare) { |
| 616 flare_ = flare; | 618 flare_ = flare; |
| 617 } | 619 } |
| 618 | 620 |
| 619 AutofillProfileSyncableService::DataBundle::DataBundle() {} | 621 AutofillProfileSyncableService::DataBundle::DataBundle() {} |
| 620 | 622 |
| 621 AutofillProfileSyncableService::DataBundle::~DataBundle() {} | 623 AutofillProfileSyncableService::DataBundle::~DataBundle() {} |
| OLD | NEW |