| 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" |
| 11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 12 #include "chrome/browser/webdata/autofill_table.h" | 12 #include "chrome/browser/webdata/autofill_table.h" |
| 13 #include "chrome/browser/webdata/web_data_service.h" | 13 #include "chrome/browser/webdata/web_data_service.h" |
| 14 #include "chrome/browser/webdata/web_database.h" | 14 #include "chrome/browser/webdata/web_database.h" |
| 15 #include "chrome/common/chrome_notification_types.h" | 15 #include "chrome/common/chrome_notification_types.h" |
| 16 #include "chrome/common/guid.h" | |
| 17 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
| 18 #include "content/public/browser/notification_service.h" | 17 #include "content/public/browser/notification_service.h" |
| 19 #include "net/base/escape.h" | 18 #include "net/base/escape.h" |
| 20 #include "sync/api/sync_error.h" | 19 #include "sync/api/sync_error.h" |
| 21 #include "sync/api/sync_error_factory.h" | 20 #include "sync/api/sync_error_factory.h" |
| 22 #include "sync/protocol/autofill_specifics.pb.h" | 21 #include "sync/protocol/autofill_specifics.pb.h" |
| 23 #include "sync/protocol/sync.pb.h" | 22 #include "sync/protocol/sync.pb.h" |
| 24 | 23 |
| 25 using content::BrowserThread; | 24 using content::BrowserThread; |
| 26 | 25 |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 UTF16ToUTF8(entry.key().value()))); | 491 UTF16ToUTF8(entry.key().value()))); |
| 493 return SyncData::CreateLocalData(tag, tag, autofill_specifics); | 492 return SyncData::CreateLocalData(tag, tag, autofill_specifics); |
| 494 } | 493 } |
| 495 | 494 |
| 496 // static | 495 // static |
| 497 std::string AutocompleteSyncableService::KeyToTag(const std::string& name, | 496 std::string AutocompleteSyncableService::KeyToTag(const std::string& name, |
| 498 const std::string& value) { | 497 const std::string& value) { |
| 499 std::string ns(kAutofillEntryNamespaceTag); | 498 std::string ns(kAutofillEntryNamespaceTag); |
| 500 return ns + net::EscapePath(name) + "|" + net::EscapePath(value); | 499 return ns + net::EscapePath(name) + "|" + net::EscapePath(value); |
| 501 } | 500 } |
| OLD | NEW |