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

Side by Side Diff: components/autofill/core/browser/webdata/autocomplete_sync_bridge.h

Issue 2582713003: [USS] Impelementation for GetData and GetAllData (Closed)
Patch Set: mark CreateAutofillEntry to public Created 4 years 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOCOMPLETE_SYNC_BRIDGE_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOCOMPLETE_SYNC_BRIDGE_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOCOMPLETE_SYNC_BRIDGE_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOCOMPLETE_SYNC_BRIDGE_H_
7 7
8 #include "base/scoped_observer.h" 8 #include "base/scoped_observer.h"
9 #include "base/supports_user_data.h" 9 #include "base/supports_user_data.h"
10 #include "base/threading/non_thread_safe.h" 10 #include "base/threading/non_thread_safe.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // "autofill_entry|$name|$value" where $name and $value are escaped. 57 // "autofill_entry|$name|$value" where $name and $value are escaped.
58 std::string GetClientTag(const syncer::EntityData& entity_data) override; 58 std::string GetClientTag(const syncer::EntityData& entity_data) override;
59 // Generate a string key uniquely identifying |entity_data| in the context of 59 // Generate a string key uniquely identifying |entity_data| in the context of
60 // local storage. The format, which should stay the same, is $name|$value" 60 // local storage. The format, which should stay the same, is $name|$value"
61 // where $name and $value are escaped. 61 // where $name and $value are escaped.
62 std::string GetStorageKey(const syncer::EntityData& entity_data) override; 62 std::string GetStorageKey(const syncer::EntityData& entity_data) override;
63 63
64 // AutofillWebDataServiceObserverOnDBThread implementation. 64 // AutofillWebDataServiceObserverOnDBThread implementation.
65 void AutofillEntriesChanged(const AutofillChangeList& changes) override; 65 void AutofillEntriesChanged(const AutofillChangeList& changes) override;
66 66
67 static AutofillEntry CreateAutofillEntry(
68 const sync_pb::AutofillSpecifics& autofill_specifics);
69
67 private: 70 private:
68 // Returns the table associated with the |web_data_backend_|. 71 // Returns the table associated with the |web_data_backend_|.
69 AutofillTable* GetAutofillTable() const; 72 AutofillTable* GetAutofillTable() const;
70 73
74 std::string GetStorageKeyFromAutofillEntry(
75 const autofill::AutofillEntry& entry);
76
77 static std::string FormatStorageKey(const std::string& name,
78 const std::string& value);
79
71 base::ThreadChecker thread_checker_; 80 base::ThreadChecker thread_checker_;
72 81
73 // AutocompleteSyncBridge is owned by |web_data_backend_| through 82 // AutocompleteSyncBridge is owned by |web_data_backend_| through
74 // SupportsUserData, so it's guaranteed to outlive |this|. 83 // SupportsUserData, so it's guaranteed to outlive |this|.
75 AutofillWebDataBackend* const web_data_backend_; 84 AutofillWebDataBackend* const web_data_backend_;
76 85
77 ScopedObserver<AutofillWebDataBackend, AutocompleteSyncBridge> 86 ScopedObserver<AutofillWebDataBackend, AutocompleteSyncBridge>
78 scoped_observer_; 87 scoped_observer_;
79 }; 88 };
80 89
81 } // namespace autofill 90 } // namespace autofill
82 91
83 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOCOMPLETE_SYNC_BRIDGE_H_ 92 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOCOMPLETE_SYNC_BRIDGE_H_
OLDNEW
« no previous file with comments | « components/autofill/core/browser/BUILD.gn ('k') | components/autofill/core/browser/webdata/autocomplete_sync_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698