Commit e2e467d1 authored by Vasilii Sukhanov's avatar Vasilii Sukhanov Committed by Commit Bot

Revert special handling of Android credentials in Chrome Sync.

It was introduced in r488421 to handle the credentials without trailing '/' in signon_realm and origin.
Now however, the signon_realm is created correctly by GmsCore. The origin has no '/'. As a result
- r488421 is useless with a lot of complexity.
- r488421 is harmful because it prevent the credential from being deleted via passwords.google.com. See b/69245513

R=battre@chromium.org

Bug: 739101,801918
Change-Id: I20e64481b8dd972e3b43f18a00b0b3078f58c4fe
Reviewed-on: https://chromium-review.googlesource.com/897610Reviewed-by: default avatarDominic Battré <battre@chromium.org>
Commit-Queue: Vasilii Sukhanov <vasilii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534073}
parent e3486063
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include "base/macros.h" #include "base/macros.h"
#include "base/sequence_checker.h" #include "base/sequence_checker.h"
#include "base/time/clock.h"
#include "components/password_manager/core/browser/password_store_change.h" #include "components/password_manager/core/browser/password_store_change.h"
#include "components/sync/model/sync_change.h" #include "components/sync/model/sync_change.h"
#include "components/sync/model/sync_data.h" #include "components/sync/model/sync_data.h"
...@@ -61,12 +60,6 @@ class PasswordSyncableService : public syncer::SyncableService { ...@@ -61,12 +60,6 @@ class PasswordSyncableService : public syncer::SyncableService {
void InjectStartSyncFlare( void InjectStartSyncFlare(
const syncer::SyncableService::StartSyncFlare& flare); const syncer::SyncableService::StartSyncFlare& flare);
#if defined(UNIT_TEST)
void set_clock(std::unique_ptr<base::Clock> clock) {
clock_ = std::move(clock);
}
#endif
private: private:
// Map from password sync tag to password form. // Map from password sync tag to password form.
typedef std::map<std::string, autofill::PasswordForm*> PasswordEntryMap; typedef std::map<std::string, autofill::PasswordForm*> PasswordEntryMap;
...@@ -87,23 +80,14 @@ class PasswordSyncableService : public syncer::SyncableService { ...@@ -87,23 +80,14 @@ class PasswordSyncableService : public syncer::SyncableService {
// Uses the |PasswordStore| APIs to change entries. // Uses the |PasswordStore| APIs to change entries.
void WriteToPasswordStore(const SyncEntries& entries); void WriteToPasswordStore(const SyncEntries& entries);
// Goes through |sync_data| and for each entry merges the data with
// |unmatched_data_from_password_db|. The result of merge is recorded in
// |sync_entries| or |updated_db_entries|. Successfully merged elements are
// removed from |unmatched_data_from_password_db|.
void MergeSyncDataWithLocalData(
const syncer::SyncDataList& sync_data,
PasswordEntryMap* unmatched_data_from_password_db,
SyncEntries* sync_entries,
syncer::SyncChangeList* updated_db_entries);
// Examines |data|, an entry in sync db, and updates |sync_entries| or // Examines |data|, an entry in sync db, and updates |sync_entries| or
// |updated_db_entries| accordingly. An element is removed from // |updated_db_entries| accordingly. An element is removed from
// |unmatched_data_from_password_db| if its tag is identical to |data|'s. // |unmatched_data_from_password_db| if its tag is identical to |data|'s.
void CreateOrUpdateEntry(const sync_pb::PasswordSpecificsData& data, static void CreateOrUpdateEntry(
PasswordEntryMap* unmatched_data_from_password_db, const syncer::SyncData& data,
SyncEntries* sync_entries, PasswordEntryMap* unmatched_data_from_password_db,
syncer::SyncChangeList* updated_db_entries); SyncEntries* sync_entries,
syncer::SyncChangeList* updated_db_entries);
// Calls |operation| for each element in |entries| and appends the changes to // Calls |operation| for each element in |entries| and appends the changes to
// |all_changes|. // |all_changes|.
...@@ -125,9 +109,6 @@ class PasswordSyncableService : public syncer::SyncableService { ...@@ -125,9 +109,6 @@ class PasswordSyncableService : public syncer::SyncableService {
// A signal activated by this class to start sync as soon as possible. // A signal activated by this class to start sync as soon as possible.
syncer::SyncableService::StartSyncFlare flare_; syncer::SyncableService::StartSyncFlare flare_;
// Clock for date_synced updates.
std::unique_ptr<base::Clock> clock_;
// True if processing sync changes is in progress. // True if processing sync changes is in progress.
bool is_processing_sync_changes_; bool is_processing_sync_changes_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment