diff options
author | raz@chromium.org <raz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-28 21:43:31 +0000 |
---|---|---|
committer | raz@chromium.org <raz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-28 21:43:31 +0000 |
commit | 099eaf0cd8ed17455d3f6a5ee88ed2783b454971 (patch) | |
tree | 6b77231bc4d99ed285a4cf7a9b393a0ce7c6b8a8 /chrome/test | |
parent | 1424babd5dbbd5200d6e4b4ef71b38f791bce8b1 (diff) | |
download | chromium_src-099eaf0cd8ed17455d3f6a5ee88ed2783b454971.zip chromium_src-099eaf0cd8ed17455d3f6a5ee88ed2783b454971.tar.gz chromium_src-099eaf0cd8ed17455d3f6a5ee88ed2783b454971.tar.bz2 |
Added UI for clearing Chrome Sync data
- Created 2 tabs, one for for clearing local browsing data, one for clearing server data
- Refactored the old local browsing code to use a grid layout rather than less-wieldy math
- Controls on all tabs block while, closing dialog is disabled, new throbber is going while clear is in progress
- Clear server tab will be behind a flag until I deploy the server endpoint
- Retained old clearing behavior: dialog closes on successful lear
- Clear server UI only visible if user is syncing
Outstanding issues:
- Clearing currently causes an account to become unusable. The cause of the issue is a known problem with auth; currently investigating a fix
- Unlike local clearing, clearing server data is more likely to error out. For now I just show a label next to the clear button that says Error, allowing the user to try again
BUG=54349
TEST=Clear from UI, or run sync backend tests checked in for issue 54280
Review URL: http://codereview.chromium.org/3412032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60845 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/sync/engine/mock_connection_manager.cc | 7 | ||||
-rw-r--r-- | chrome/test/sync/engine/mock_connection_manager.h | 6 |
2 files changed, 8 insertions, 5 deletions
diff --git a/chrome/test/sync/engine/mock_connection_manager.cc b/chrome/test/sync/engine/mock_connection_manager.cc index cc59915..b22a8e1 100644 --- a/chrome/test/sync/engine/mock_connection_manager.cc +++ b/chrome/test/sync/engine/mock_connection_manager.cc @@ -362,17 +362,18 @@ void MockConnectionManager::ProcessGetUpdates(ClientToServerMessage* csm, } void MockConnectionManager::SetClearUserDataResponseStatus( - sync_pb::UserDataStatus status) { + sync_pb::ClientToServerResponse::ErrorType errortype ) { // Note: this is not a thread-safe set, ok for now. NOT ok if tests // run the syncer on the background thread while this method is called. - clear_user_data_response_.set_status(status); + clear_user_data_response_errortype_ = errortype; } void MockConnectionManager::ProcessClearData(ClientToServerMessage* csm, ClientToServerResponse* response) { CHECK(csm->has_clear_user_data()); ASSERT_EQ(csm->message_contents(), ClientToServerMessage::CLEAR_DATA); - response->mutable_clear_user_data()->CopyFrom(clear_user_data_response_); + response->clear_user_data(); + response->set_error_code(clear_user_data_response_errortype_); } void MockConnectionManager::ProcessAuthenticate( diff --git a/chrome/test/sync/engine/mock_connection_manager.h b/chrome/test/sync/engine/mock_connection_manager.h index 2ed6ad4..a6edce6 100644 --- a/chrome/test/sync/engine/mock_connection_manager.h +++ b/chrome/test/sync/engine/mock_connection_manager.h @@ -128,7 +128,8 @@ class MockConnectionManager : public browser_sync::ServerConnectionManager { void FailNextPostBufferToPathCall() { fail_next_postbuffer_ = true; } - void SetClearUserDataResponseStatus(sync_pb::UserDataStatus status); + void SetClearUserDataResponseStatus( + sync_pb::ClientToServerResponse::ErrorType errortype); // A visitor class to allow a test to change some monitoring state atomically // with the action of overriding the response codes sent back to the Syncer @@ -294,7 +295,8 @@ class MockConnectionManager : public browser_sync::ServerConnectionManager { MidCommitObserver* mid_commit_observer_; // The clear data response we'll return in the next response - sync_pb::ClearUserDataResponse clear_user_data_response_; + sync_pb::ClientToServerResponse::ErrorType + clear_user_data_response_errortype_; // The AUTHENTICATE response we'll return for auth requests. sync_pb::AuthenticateResponse auth_response_; |