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

Side by Side Diff: chrome/browser/chromeos/policy/consumer_management_notifier.cc

Issue 873033002: Cleanup: Remove unused blink::WebTextDirection parameter from Notification ctor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more fixes Created 5 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/power/peripheral_battery_observer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/chromeos/policy/consumer_management_notifier.h" 5 #include "chrome/browser/chromeos/policy/consumer_management_notifier.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 optional_field.buttons.push_back(message_center::ButtonInfo( 164 optional_field.buttons.push_back(message_center::ButtonInfo(
165 l10n_util::GetStringUTF16(button_label_message_id))); 165 l10n_util::GetStringUTF16(button_label_message_id)));
166 166
167 Notification notification( 167 Notification notification(
168 message_center::NOTIFICATION_TYPE_SIMPLE, 168 message_center::NOTIFICATION_TYPE_SIMPLE,
169 GURL(notification_url), 169 GURL(notification_url),
170 l10n_util::GetStringUTF16(title_message_id), 170 l10n_util::GetStringUTF16(title_message_id),
171 l10n_util::GetStringUTF16(body_message_id), 171 l10n_util::GetStringUTF16(body_message_id),
172 ui::ResourceBundle::GetSharedInstance().GetImageNamed( 172 ui::ResourceBundle::GetSharedInstance().GetImageNamed(
173 IDR_CONSUMER_MANAGEMENT_NOTIFICATION_ICON), 173 IDR_CONSUMER_MANAGEMENT_NOTIFICATION_ICON),
174 blink::WebTextDirectionDefault,
175 message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT, 174 message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT,
176 notification_id), 175 notification_id),
177 base::string16(), // display_source 176 base::string16(), // display_source
178 base::UTF8ToUTF16(notification_id), 177 base::UTF8ToUTF16(notification_id),
179 optional_field, 178 optional_field,
180 new DesktopNotificationDelegate(notification_id, button_click_callback)); 179 new DesktopNotificationDelegate(notification_id, button_click_callback));
181 180
182 notification.SetSystemPriority(); 181 notification.SetSystemPriority();
183 g_browser_process->notification_ui_manager()->Add(notification, profile_); 182 g_browser_process->notification_ui_manager()->Add(notification, profile_);
184 } 183 }
185 184
186 void ConsumerManagementNotifier::OpenSettingsPage() const { 185 void ConsumerManagementNotifier::OpenSettingsPage() const {
187 const GURL url(chrome::kChromeUISettingsURL); 186 const GURL url(chrome::kChromeUISettingsURL);
188 chrome::NavigateParams params(profile_, url, ui::PAGE_TRANSITION_LINK); 187 chrome::NavigateParams params(profile_, url, ui::PAGE_TRANSITION_LINK);
189 params.disposition = NEW_FOREGROUND_TAB; 188 params.disposition = NEW_FOREGROUND_TAB;
190 chrome::Navigate(&params); 189 chrome::Navigate(&params);
191 } 190 }
192 191
193 void ConsumerManagementNotifier::TryAgain() const { 192 void ConsumerManagementNotifier::TryAgain() const {
194 const GURL base_url(chrome::kChromeUISettingsURL); 193 const GURL base_url(chrome::kChromeUISettingsURL);
195 const GURL url = base_url.Resolve(kConsumerManagementOverlay); 194 const GURL url = base_url.Resolve(kConsumerManagementOverlay);
196 195
197 chrome::NavigateParams params(profile_, url, ui::PAGE_TRANSITION_LINK); 196 chrome::NavigateParams params(profile_, url, ui::PAGE_TRANSITION_LINK);
198 params.disposition = NEW_FOREGROUND_TAB; 197 params.disposition = NEW_FOREGROUND_TAB;
199 chrome::Navigate(&params); 198 chrome::Navigate(&params);
200 } 199 }
201 200
202 } // namespace policy 201 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/power/peripheral_battery_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698