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/autocomplete_syncable_service.h" | 5 #include "chrome/browser/webdata/autocomplete_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/rand_util.h" | 9 #include "base/rand_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 << " Error:" << error.message(); | 453 << " Error:" << error.message(); |
454 } | 454 } |
455 } | 455 } |
456 | 456 |
457 syncer::SyncData AutocompleteSyncableService::CreateSyncData( | 457 syncer::SyncData AutocompleteSyncableService::CreateSyncData( |
458 const AutofillEntry& entry) const { | 458 const AutofillEntry& entry) const { |
459 sync_pb::EntitySpecifics autofill_specifics; | 459 sync_pb::EntitySpecifics autofill_specifics; |
460 WriteAutofillEntry(entry, &autofill_specifics); | 460 WriteAutofillEntry(entry, &autofill_specifics); |
461 std::string tag(KeyToTag(UTF16ToUTF8(entry.key().name()), | 461 std::string tag(KeyToTag(UTF16ToUTF8(entry.key().name()), |
462 UTF16ToUTF8(entry.key().value()))); | 462 UTF16ToUTF8(entry.key().value()))); |
463 return syncer::SyncData::CreateLocalData(tag, tag, autofill_specifics); | 463 return syncer::SyncData::CreateLocalData(tag, tag, autofill_specifics, false); |
464 } | 464 } |
465 | 465 |
466 // static | 466 // static |
467 std::string AutocompleteSyncableService::KeyToTag(const std::string& name, | 467 std::string AutocompleteSyncableService::KeyToTag(const std::string& name, |
468 const std::string& value) { | 468 const std::string& value) { |
469 std::string ns(kAutofillEntryNamespaceTag); | 469 std::string ns(kAutofillEntryNamespaceTag); |
470 return ns + net::EscapePath(name) + "|" + net::EscapePath(value); | 470 return ns + net::EscapePath(name) + "|" + net::EscapePath(value); |
471 } | 471 } |
OLD | NEW |