summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/sessions/status_controller.h
diff options
context:
space:
mode:
authorzea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-05 00:56:16 +0000
committerzea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-05 00:56:16 +0000
commit92009f8d856c77a8c61c2c7de994a07f8d70d2b5 (patch)
tree99fc8f0125d8f93a6933ce95bdb18d3ae1a2a42c /chrome/browser/sync/sessions/status_controller.h
parent67e167b8fa30e7a024f7697da9d4a87279baf4ac (diff)
downloadchromium_src-92009f8d856c77a8c61c2c7de994a07f8d70d2b5.zip
chromium_src-92009f8d856c77a8c61c2c7de994a07f8d70d2b5.tar.gz
chromium_src-92009f8d856c77a8c61c2c7de994a07f8d70d2b5.tar.bz2
[Sync] Support for non-blocking conflicts and encryption conflicts.
This patch introduces the notion of non-blocking conflicts. These are conflicts that do not result in the syncer getting stuck. They affect the HasConflictingUpdates status call, so we attempt to reapply updates when they occur, but they are not passed to the conflict resolver, and hence do not result in the syncer being stuck. All cases where we have a conflict due to encryption/decryption result in a new ENCRYPTION_CONFLICT, which are treated as nonblocking conflicts. Updated sync's protocol_version to 27 so the server can tell which clients understand encryption. Also, due to this change, it's more likely that local/server changes will be overwritten in the conflict resolver (since encryption conflicts are kept as unapplied while they can't be decrypted). Added counters for how often this happens, which will appear on about:sync, and filed follow up bug crbug.com/76596. BUG=59242 TEST=new session sync_integration tests, modified apply_updates_command unit tests Review URL: http://codereview.chromium.org/6714002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84177 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/sessions/status_controller.h')
-rw-r--r--chrome/browser/sync/sessions/status_controller.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/chrome/browser/sync/sessions/status_controller.h b/chrome/browser/sync/sessions/status_controller.h
index d4c912a..0f76782 100644
--- a/chrome/browser/sync/sessions/status_controller.h
+++ b/chrome/browser/sync/sessions/status_controller.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -33,6 +33,7 @@
#define CHROME_BROWSER_SYNC_SESSIONS_STATUS_CONTROLLER_H_
#pragma once
+#include <vector>
#include <map>
#include "base/stl_util-inl.h"
@@ -150,10 +151,17 @@ class StatusController {
// If a GetUpdates for any data type resulted in downloading an update that
// is in conflict, this method returns true.
+ // Note: this includes non-blocking conflicts.
bool HasConflictingUpdates() const;
// Aggregate sum of ConflictingItemSize() over all ConflictProgress objects
// (one for each ModelSafeGroup currently in-use).
+ // Note: this does not include non-blocking conflicts.
+ int TotalNumBlockingConflictingItems() const;
+
+ // Aggregate sum of ConflictingItemSize() and NonblockingConflictingItemsSize
+ // over all ConflictProgress objects (one for each ModelSafeGroup currently
+ // in-use).
int TotalNumConflictingItems() const;
// Returns the number of updates received from the sync server.
@@ -214,6 +222,8 @@ class StatusController {
void increment_num_tombstone_updates_downloaded_by(int value);
void set_types_needing_local_migration(const syncable::ModelTypeSet& types);
void set_unsynced_handles(const std::vector<int64>& unsynced_handles);
+ void increment_num_local_overwrites();
+ void increment_num_server_overwrites();
void set_commit_set(const OrderedCommitSet& commit_set);
void update_conflict_sets_built(bool built);