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

Side by Side Diff: chrome/browser/sync/sync_error_notifier_ash.cc

Issue 2388673002: Revert of [Sync] Move //components/sync to the syncer namespace. (patchset #5 id:40001 of https://co (Closed)
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/sync/sync_error_notifier_ash.h" 5 #include "chrome/browser/sync/sync_error_notifier_ash.h"
6 6
7 #include "ash/common/system/system_notifier.h" 7 #include "ash/common/system/system_notifier.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // See crbug.com/354280. 89 // See crbug.com/354280.
90 login_ui->current_login_ui()->FocusUI(); 90 login_ui->current_login_ui()->FocusUI();
91 return; 91 return;
92 } 92 }
93 93
94 chrome::ShowSettingsSubPageForProfile(profile_, chrome::kSyncSetupSubPage); 94 chrome::ShowSettingsSubPageForProfile(profile_, chrome::kSyncSetupSubPage);
95 } 95 }
96 96
97 } // namespace 97 } // namespace
98 98
99 SyncErrorNotifier::SyncErrorNotifier(syncer::SyncErrorController* controller, 99 SyncErrorNotifier::SyncErrorNotifier(SyncErrorController* controller,
100 Profile* profile) 100 Profile* profile)
101 : error_controller_(controller), profile_(profile) { 101 : error_controller_(controller),
102 profile_(profile) {
102 // Create a unique notification ID for this profile. 103 // Create a unique notification ID for this profile.
103 notification_id_ = 104 notification_id_ =
104 kProfileSyncNotificationId + profile_->GetProfileUserName(); 105 kProfileSyncNotificationId + profile_->GetProfileUserName();
105 106
106 error_controller_->AddObserver(this); 107 error_controller_->AddObserver(this);
107 OnErrorChanged(); 108 OnErrorChanged();
108 } 109 }
109 110
110 SyncErrorNotifier::~SyncErrorNotifier() { 111 SyncErrorNotifier::~SyncErrorNotifier() {
111 DCHECK(!error_controller_) 112 DCHECK(!error_controller_)
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 message_center::NOTIFICATION_TYPE_SIMPLE, 172 message_center::NOTIFICATION_TYPE_SIMPLE,
172 l10n_util::GetStringUTF16(IDS_SYNC_ERROR_BUBBLE_VIEW_TITLE), 173 l10n_util::GetStringUTF16(IDS_SYNC_ERROR_BUBBLE_VIEW_TITLE),
173 l10n_util::GetStringUTF16(IDS_SYNC_PASSPHRASE_ERROR_BUBBLE_VIEW_MESSAGE), 174 l10n_util::GetStringUTF16(IDS_SYNC_PASSPHRASE_ERROR_BUBBLE_VIEW_MESSAGE),
174 ui::ResourceBundle::GetSharedInstance().GetImageNamed( 175 ui::ResourceBundle::GetSharedInstance().GetImageNamed(
175 IDR_NOTIFICATION_ALERT), 176 IDR_NOTIFICATION_ALERT),
176 notifier_id, 177 notifier_id,
177 base::string16(), // display_source 178 base::string16(), // display_source
178 GURL(notification_id_), notification_id_, data, delegate); 179 GURL(notification_id_), notification_id_, data, delegate);
179 notification_ui_manager->Add(notification, profile_); 180 notification_ui_manager->Add(notification, profile_);
180 } 181 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_error_notifier_ash.h ('k') | chrome/browser/sync/sync_error_notifier_ash_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698