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

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

Issue 10383127: Explode Autofill sync error messages for debugging (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Return a SyncError, which includes a Location, rather than a bool+message Created 8 years, 7 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) 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/location.h" 7 #include "base/location.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/autofill/autofill_profile.h" 10 #include "chrome/browser/autofill/autofill_profile.h"
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 new_changes.push_back(SyncChange(SyncChange::ACTION_DELETE, 451 new_changes.push_back(SyncChange(SyncChange::ACTION_DELETE,
452 CreateData(empty_profile))); 452 CreateData(empty_profile)));
453 profiles_map_.erase(change.key()); 453 profiles_map_.erase(change.key());
454 break; 454 break;
455 } 455 }
456 default: 456 default:
457 NOTREACHED(); 457 NOTREACHED();
458 } 458 }
459 SyncError error = sync_processor_->ProcessSyncChanges(FROM_HERE, new_changes); 459 SyncError error = sync_processor_->ProcessSyncChanges(FROM_HERE, new_changes);
460 if (error.IsSet()) { 460 if (error.IsSet()) {
461 DLOG(WARNING) << "[AUTOFILL SYNC]" 461 // TODO(isherman): Investigating http://crbug.com/121592
462 << " Failed processing change:" 462 VLOG(1) << "[AUTOFILL SYNC] "
463 << " Error:" << error.message() 463 << "Failed processing change:\n"
464 << " Guid:" << change.key(); 464 << " Error: " << error.message() << "\n"
465 << " Guid: " << change.key();
465 } 466 }
466 } 467 }
467 468
468 SyncData AutofillProfileSyncableService::CreateData( 469 SyncData AutofillProfileSyncableService::CreateData(
469 const AutofillProfile& profile) { 470 const AutofillProfile& profile) {
470 sync_pb::EntitySpecifics specifics; 471 sync_pb::EntitySpecifics specifics;
471 WriteAutofillProfile(profile, &specifics); 472 WriteAutofillProfile(profile, &specifics);
472 return SyncData::CreateLocalData(profile.guid(), profile.guid(), specifics); 473 return SyncData::CreateLocalData(profile.guid(), profile.guid(), specifics);
473 } 474 }
474 475
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 } 516 }
516 517
517 AutofillTable* AutofillProfileSyncableService::GetAutofillTable() const { 518 AutofillTable* AutofillProfileSyncableService::GetAutofillTable() const {
518 return web_data_service_->GetDatabase()->GetAutofillTable(); 519 return web_data_service_->GetDatabase()->GetAutofillTable();
519 } 520 }
520 521
521 AutofillProfileSyncableService::DataBundle::DataBundle() {} 522 AutofillProfileSyncableService::DataBundle::DataBundle() {}
522 523
523 AutofillProfileSyncableService::DataBundle::~DataBundle() { 524 AutofillProfileSyncableService::DataBundle::~DataBundle() {
524 } 525 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698