diff options
author | maniscalco@chromium.org <maniscalco@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-21 20:55:44 +0000 |
---|---|---|
committer | maniscalco@chromium.org <maniscalco@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-21 20:55:44 +0000 |
commit | 9cb5c9d40dc7cfd0b923809897bc081b04258009 (patch) | |
tree | b1e0f48c695888bf8b86466280c377e2466f2776 /sync/sessions | |
parent | 932aaa47f3eead48ad440dff9d0532c5a8ef4af6 (diff) | |
download | chromium_src-9cb5c9d40dc7cfd0b923809897bc081b04258009.zip chromium_src-9cb5c9d40dc7cfd0b923809897bc081b04258009.tar.gz chromium_src-9cb5c9d40dc7cfd0b923809897bc081b04258009.tar.bz2 |
Don't clear debug info until after it has been sent to the server.
Replaced DebugInfoGetter::GetAndClearDebugInfo with GetDebugInfo and ClearDebugInfo so we can clear the debug info only after we have successfully sent it to the server.
Moved MockDebugInfoGetter into its own file so it can be used by other tests.
BUG=319937
Review URL: https://codereview.chromium.org/61213009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236591 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/sessions')
-rw-r--r-- | sync/sessions/debug_info_getter.h | 11 | ||||
-rw-r--r-- | sync/sessions/status_controller.cc | 8 | ||||
-rw-r--r-- | sync/sessions/status_controller.h | 4 |
3 files changed, 7 insertions, 16 deletions
diff --git a/sync/sessions/debug_info_getter.h b/sync/sessions/debug_info_getter.h index c1536ba..7efe0cb 100644 --- a/sync/sessions/debug_info_getter.h +++ b/sync/sessions/debug_info_getter.h @@ -15,9 +15,13 @@ namespace sessions { // to communicate the debug info data to the syncer. class SYNC_EXPORT_PRIVATE DebugInfoGetter { public: - // Gets the client debug info and clears the state so the same data is not - // sent again. - virtual void GetAndClearDebugInfo(sync_pb::DebugInfo* debug_info) = 0; + // Gets the client debug info. Be sure to clear the info to ensure the data + // isn't sent multiple times. + virtual void GetDebugInfo(sync_pb::DebugInfo* debug_info) = 0; + + // Clears the debug info. + virtual void ClearDebugInfo() = 0; + virtual ~DebugInfoGetter() {} }; @@ -25,4 +29,3 @@ class SYNC_EXPORT_PRIVATE DebugInfoGetter { } // namespace syncer #endif // SYNC_SESSIONS_DEBUG_INFO_GETTER_H_ - diff --git a/sync/sessions/status_controller.cc b/sync/sessions/status_controller.cc index abd6f1e..f6fbdb5 100644 --- a/sync/sessions/status_controller.cc +++ b/sync/sessions/status_controller.cc @@ -163,13 +163,5 @@ bool StatusController::ServerSaysNothingMoreToDownload() const { return updates_response().get_updates().changes_remaining() == 0; } -void StatusController::set_debug_info_sent() { - model_neutral_.debug_info_sent = true; -} - -bool StatusController::debug_info_sent() const { - return model_neutral_.debug_info_sent; -} - } // namespace sessions } // namespace syncer diff --git a/sync/sessions/status_controller.h b/sync/sessions/status_controller.h index 101e583..75b8b82 100644 --- a/sync/sessions/status_controller.h +++ b/sync/sessions/status_controller.h @@ -141,10 +141,6 @@ class SYNC_EXPORT_PRIVATE StatusController { void UpdateStartTime(); - void set_debug_info_sent(); - - bool debug_info_sent() const; - private: friend class ScopedModelSafeGroupRestriction; |