| Index: chrome/browser/sync/sync_global_error.cc
|
| diff --git a/chrome/browser/sync/sync_global_error.cc b/chrome/browser/sync/sync_global_error.cc
|
| index faf79e44e3e7ecb7b85203de838ea9dc70ccf4a6..ee37b78037dbdb29ced51a2a8fec326c40697993 100644
|
| --- a/chrome/browser/sync/sync_global_error.cc
|
| +++ b/chrome/browser/sync/sync_global_error.cc
|
| @@ -9,7 +9,6 @@
|
| #include "chrome/browser/ui/browser.h"
|
| #include "chrome/browser/ui/browser_commands.h"
|
| #include "chrome/browser/ui/chrome_pages.h"
|
| -#include "chrome/browser/ui/global_error/global_error_service.h"
|
| #include "chrome/browser/ui/webui/signin/login_ui_service.h"
|
| #include "chrome/common/url_constants.h"
|
| #include "chrome/grit/generated_resources.h"
|
| @@ -19,18 +18,14 @@
|
| #include "ui/base/l10n/l10n_util.h"
|
|
|
| SyncGlobalError::SyncGlobalError(
|
| - GlobalErrorService* global_error_service,
|
| LoginUIService* login_ui_service,
|
| syncer::SyncErrorController* error_controller,
|
| browser_sync::ProfileSyncService* profile_sync_service)
|
| - : global_error_service_(global_error_service),
|
| - login_ui_service_(login_ui_service),
|
| + : login_ui_service_(login_ui_service),
|
| error_controller_(error_controller),
|
| sync_service_(profile_sync_service) {
|
| DCHECK(sync_service_);
|
| error_controller_->AddObserver(this);
|
| - if (!switches::IsMaterialDesignUserMenu())
|
| - global_error_service_->AddUnownedGlobalError(this);
|
| }
|
|
|
| SyncGlobalError::~SyncGlobalError() {
|
| @@ -39,8 +34,6 @@ SyncGlobalError::~SyncGlobalError() {
|
| }
|
|
|
| void SyncGlobalError::Shutdown() {
|
| - if (!switches::IsMaterialDesignUserMenu())
|
| - global_error_service_->RemoveUnownedGlobalError(this);
|
| error_controller_->RemoveObserver(this);
|
| error_controller_ = nullptr;
|
| }
|
| @@ -98,27 +91,4 @@ void SyncGlobalError::BubbleViewCancelButtonPressed(Browser* browser) {
|
| }
|
|
|
| void SyncGlobalError::OnErrorChanged() {
|
| - if (switches::IsMaterialDesignUserMenu())
|
| - return;
|
| -
|
| - base::string16 menu_label;
|
| - base::string16 bubble_message;
|
| - base::string16 bubble_accept_label;
|
| - sync_ui_util::GetStatusLabelsForSyncGlobalError(
|
| - sync_service_, &menu_label, &bubble_message, &bubble_accept_label);
|
| -
|
| - // All the labels should be empty or all of them non-empty.
|
| - DCHECK((menu_label.empty() && bubble_message.empty() &&
|
| - bubble_accept_label.empty()) ||
|
| - (!menu_label.empty() && !bubble_message.empty() &&
|
| - !bubble_accept_label.empty()));
|
| -
|
| - if (menu_label != menu_label_ || bubble_message != bubble_message_ ||
|
| - bubble_accept_label != bubble_accept_label_) {
|
| - menu_label_ = menu_label;
|
| - bubble_message_ = bubble_message;
|
| - bubble_accept_label_ = bubble_accept_label;
|
| -
|
| - global_error_service_->NotifyErrorsChanged(this);
|
| - }
|
| }
|
|
|