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

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

Issue 2376123003: [Sync] Move //components/sync to the syncer namespace. (Closed)
Patch Set: Fix tools and iOS. 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/macros.h" 8 #include "base/macros.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // See crbug.com/354280. 91 // See crbug.com/354280.
92 login_ui->current_login_ui()->FocusUI(); 92 login_ui->current_login_ui()->FocusUI();
93 return; 93 return;
94 } 94 }
95 95
96 chrome::ShowSettingsSubPageForProfile(profile_, chrome::kSyncSetupSubPage); 96 chrome::ShowSettingsSubPageForProfile(profile_, chrome::kSyncSetupSubPage);
97 } 97 }
98 98
99 } // namespace 99 } // namespace
100 100
101 SyncErrorNotifier::SyncErrorNotifier(SyncErrorController* controller, 101 SyncErrorNotifier::SyncErrorNotifier(syncer::SyncErrorController* controller,
102 Profile* profile) 102 Profile* profile)
103 : error_controller_(controller), 103 : error_controller_(controller), profile_(profile) {
104 profile_(profile) {
105 // Create a unique notification ID for this profile. 104 // Create a unique notification ID for this profile.
106 notification_id_ = 105 notification_id_ =
107 kProfileSyncNotificationId + profile_->GetProfileUserName(); 106 kProfileSyncNotificationId + profile_->GetProfileUserName();
108 107
109 error_controller_->AddObserver(this); 108 error_controller_->AddObserver(this);
110 OnErrorChanged(); 109 OnErrorChanged();
111 } 110 }
112 111
113 SyncErrorNotifier::~SyncErrorNotifier() { 112 SyncErrorNotifier::~SyncErrorNotifier() {
114 DCHECK(!error_controller_) 113 DCHECK(!error_controller_)
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 message_center::NOTIFICATION_TYPE_SIMPLE, 173 message_center::NOTIFICATION_TYPE_SIMPLE,
175 l10n_util::GetStringUTF16(IDS_SYNC_ERROR_BUBBLE_VIEW_TITLE), 174 l10n_util::GetStringUTF16(IDS_SYNC_ERROR_BUBBLE_VIEW_TITLE),
176 l10n_util::GetStringUTF16(IDS_SYNC_PASSPHRASE_ERROR_BUBBLE_VIEW_MESSAGE), 175 l10n_util::GetStringUTF16(IDS_SYNC_PASSPHRASE_ERROR_BUBBLE_VIEW_MESSAGE),
177 ui::ResourceBundle::GetSharedInstance().GetImageNamed( 176 ui::ResourceBundle::GetSharedInstance().GetImageNamed(
178 IDR_NOTIFICATION_ALERT), 177 IDR_NOTIFICATION_ALERT),
179 notifier_id, 178 notifier_id,
180 base::string16(), // display_source 179 base::string16(), // display_source
181 GURL(notification_id_), notification_id_, data, delegate); 180 GURL(notification_id_), notification_id_, data, delegate);
182 notification_ui_manager->Add(notification, profile_); 181 notification_ui_manager->Add(notification, profile_);
183 } 182 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698