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

Unified Diff: chrome/browser/views/clear_server_data.cc

Issue 3840001: Revert 61848 - [Mac] UI for clearing sync data on the server.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 2 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/clear_server_data.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/clear_server_data.cc
===================================================================
--- chrome/browser/views/clear_server_data.cc (revision 62782)
+++ chrome/browser/views/clear_server_data.cc (working copy)
@@ -286,13 +286,12 @@
void ClearServerDataView::UpdateControlEnabledState() {
bool delete_in_progress = false;
- // Succeeded/FailedClearingServerData should only be called once, not every
- // time the view is refreshed. As such, on success/failure handle that state
- // and immediately reset things back to CLEAR_NOT_STARTED.
+ // We only want to call Suceeded/FailedClearingServerData once, not every
+ // time the view is refreshed. As such, on success/failure we handle that
+ // state and immediately reset things back to CLEAR_NOT_STARTED.
ProfileSyncService::ClearServerDataState clear_state =
- (sync_service_ == NULL) ?
- ProfileSyncService::CLEAR_NOT_STARTED :
- sync_service_->GetClearServerDataState();
Avi (use Gerrit) 2010/10/15 20:28:56 This was a reverse-merge conflict due to the fact
+ profile_->GetProfileSyncService()->GetClearServerDataState();
+ profile_->GetProfileSyncService()->ResetClearServerDataState();
if (NULL != sync_service_) {
sync_service_->ResetClearServerDataState();
@@ -300,30 +299,30 @@
switch (clear_state) {
case ProfileSyncService::CLEAR_NOT_STARTED:
- // This can occur on a first start and after a failed clear (which does
- // not close the tab). Do nothing.
+ // We can get here when we first start and after a failed clear (which
+ // does not close the tab), do nothing.
break;
case ProfileSyncService::CLEAR_CLEARING:
- // Clearing buttons on all tabs are disabled at this point, throbber is
- // going.
- status_label_->SetText(l10n_util::GetString(IDS_CLEAR_DATA_SENDING));
- status_label_->SetVisible(true);
- delete_in_progress = true;
+ // Clearing buttons on all tabs are disabled at this
+ // point, throbber is going
+ status_label_->SetText(l10n_util::GetString(IDS_CLEAR_DATA_SENDING));
+ status_label_->SetVisible(true);
+ delete_in_progress = true;
break;
case ProfileSyncService::CLEAR_FAILED:
- // Show an error and reallow clearing.
- clear_data_parent_window_->FailedClearingServerData();
- status_label_->SetText(l10n_util::GetString(IDS_CLEAR_DATA_ERROR));
- status_label_->SetVisible(true);
- delete_in_progress = false;
+ // Show an error and reallow clearing
+ clear_data_parent_window_->FailedClearingServerData();
+ status_label_->SetText(l10n_util::GetString(IDS_CLEAR_DATA_ERROR));
+ status_label_->SetVisible(true);
+ delete_in_progress = false;
break;
case ProfileSyncService::CLEAR_SUCCEEDED:
- // Close the dialog box, success!
- status_label_->SetVisible(false);
- delete_in_progress = false;
- clear_data_parent_window_->SucceededClearingServerData();
+ // Close the dialog box, success!
+ status_label_->SetVisible(false);
+ delete_in_progress = false;
+ clear_data_parent_window_->SucceededClearingServerData();
break;
- }
+ }
// allow_clear can be false when a local browsing data clear is happening
// from the neighboring tab. delete_in_progress means that a clear is
Property changes on: chrome/browser/views/clear_server_data.cc
___________________________________________________________________
Deleted: svn:eol-style
- LF
« no previous file with comments | « chrome/browser/views/clear_server_data.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698