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

Side by Side Diff: components/autofill/core/browser/webdata/autocomplete_syncable_service.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 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
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 "components/autofill/core/browser/webdata/autocomplete_syncable_service .h" 5 #include "components/autofill/core/browser/webdata/autocomplete_syncable_service .h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8
8 #include <utility> 9 #include <utility>
9 10
10 #include "base/location.h" 11 #include "base/location.h"
11 #include "base/logging.h" 12 #include "base/logging.h"
12 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
13 #include "components/autofill/core/browser/webdata/autofill_table.h" 14 #include "components/autofill/core/browser/webdata/autofill_table.h"
14 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" 15 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
16 #include "components/sync/api/sync_error.h"
17 #include "components/sync/api/sync_error_factory.h"
18 #include "components/sync/protocol/autofill_specifics.pb.h"
19 #include "components/sync/protocol/sync.pb.h"
15 #include "components/webdata/common/web_database.h" 20 #include "components/webdata/common/web_database.h"
16 #include "net/base/escape.h" 21 #include "net/base/escape.h"
17 #include "sync/api/sync_error.h"
18 #include "sync/api/sync_error_factory.h"
19 #include "sync/protocol/autofill_specifics.pb.h"
20 #include "sync/protocol/sync.pb.h"
21 22
22 namespace autofill { 23 namespace autofill {
23 namespace { 24 namespace {
24 25
25 const char kAutofillEntryNamespaceTag[] = "autofill_entry|"; 26 const char kAutofillEntryNamespaceTag[] = "autofill_entry|";
26 27
27 // Merges timestamps from the |sync_timestamps| and the |local_entry|. 28 // Merges timestamps from the |sync_timestamps| and the |local_entry|.
28 // Returns true if they were different, false if they were the same. If the 29 // Returns true if they were different, false if they were the same. If the
29 // timestamps were different, fills |date_created| and |date_last_used| with the 30 // timestamps were different, fills |date_created| and |date_last_used| with the
30 // merged timestamps. The |sync_timestamps| vector is assumed to be sorted. 31 // merged timestamps. The |sync_timestamps| vector is assumed to be sorted.
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 } 420 }
420 421
421 // static 422 // static
422 std::string AutocompleteSyncableService::KeyToTag(const std::string& name, 423 std::string AutocompleteSyncableService::KeyToTag(const std::string& name,
423 const std::string& value) { 424 const std::string& value) {
424 std::string prefix(kAutofillEntryNamespaceTag); 425 std::string prefix(kAutofillEntryNamespaceTag);
425 return prefix + net::EscapePath(name) + "|" + net::EscapePath(value); 426 return prefix + net::EscapePath(name) + "|" + net::EscapePath(value);
426 } 427 }
427 428
428 } // namespace autofill 429 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698