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

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

Issue 9668028: [Sync] Create new top-level sync/ directory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to head Created 8 years, 9 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/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/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/sync/api/sync_error.h" 11 #include "chrome/browser/sync/api/sync_error.h"
12 #include "chrome/browser/sync/protocol/autofill_specifics.pb.h"
13 #include "chrome/browser/sync/protocol/sync.pb.h"
14 #include "chrome/browser/webdata/autofill_table.h" 12 #include "chrome/browser/webdata/autofill_table.h"
15 #include "chrome/browser/webdata/web_data_service.h" 13 #include "chrome/browser/webdata/web_data_service.h"
16 #include "chrome/browser/webdata/web_database.h" 14 #include "chrome/browser/webdata/web_database.h"
17 #include "chrome/common/chrome_notification_types.h" 15 #include "chrome/common/chrome_notification_types.h"
18 #include "chrome/common/guid.h" 16 #include "chrome/common/guid.h"
19 #include "content/public/browser/browser_thread.h" 17 #include "content/public/browser/browser_thread.h"
20 #include "content/public/browser/notification_service.h" 18 #include "content/public/browser/notification_service.h"
21 #include "net/base/escape.h" 19 #include "net/base/escape.h"
20 #include "sync/protocol/autofill_specifics.pb.h"
21 #include "sync/protocol/sync.pb.h"
22 22
23 using content::BrowserThread; 23 using content::BrowserThread;
24 24
25 namespace { 25 namespace {
26 26
27 const char kAutofillEntryNamespaceTag[] = "autofill_entry|"; 27 const char kAutofillEntryNamespaceTag[] = "autofill_entry|";
28 28
29 // Merges timestamps from the |autofill| entry and |timestamps|. Returns 29 // Merges timestamps from the |autofill| entry and |timestamps|. Returns
30 // true if they were different, false if they were the same. 30 // true if they were different, false if they were the same.
31 // All of the timestamp vectors are assummed to be sorted, resulting vector is 31 // All of the timestamp vectors are assummed to be sorted, resulting vector is
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 UTF16ToUTF8(entry.key().value()))); 384 UTF16ToUTF8(entry.key().value())));
385 return SyncData::CreateLocalData(tag, tag, autofill_specifics); 385 return SyncData::CreateLocalData(tag, tag, autofill_specifics);
386 } 386 }
387 387
388 // static 388 // static
389 std::string AutocompleteSyncableService::KeyToTag(const std::string& name, 389 std::string AutocompleteSyncableService::KeyToTag(const std::string& name,
390 const std::string& value) { 390 const std::string& value) {
391 std::string ns(kAutofillEntryNamespaceTag); 391 std::string ns(kAutofillEntryNamespaceTag);
392 return ns + net::EscapePath(name) + "|" + net::EscapePath(value); 392 return ns + net::EscapePath(name) + "|" + net::EscapePath(value);
393 } 393 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/util/protobuf_unittest.cc ('k') | chrome/browser/webdata/autofill_profile_syncable_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698