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

Side by Side Diff: chrome/browser/chromeos/file_system_provider/notification_manager.cc

Issue 1292003004: Elide origins displayed on web notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Style nit Created 5 years, 4 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/chromeos/file_system_provider/notification_manager.h" 5 #include "chrome/browser/chromeos/file_system_provider/notification_manager.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/extensions/app_icon_loader_impl.h" 9 #include "chrome/browser/extensions/app_icon_loader_impl.h"
10 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" 10 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 new message_center::Notification( 124 new message_center::Notification(
125 message_center::NOTIFICATION_TYPE_SIMPLE, 125 message_center::NOTIFICATION_TYPE_SIMPLE,
126 file_system_info_.mount_path().value(), 126 file_system_info_.mount_path().value(),
127 base::UTF8ToUTF16(file_system_info_.display_name()), 127 base::UTF8ToUTF16(file_system_info_.display_name()),
128 l10n_util::GetStringUTF16( 128 l10n_util::GetStringUTF16(
129 callbacks_.size() == 1 129 callbacks_.size() == 1
130 ? IDS_FILE_SYSTEM_PROVIDER_UNRESPONSIVE_WARNING 130 ? IDS_FILE_SYSTEM_PROVIDER_UNRESPONSIVE_WARNING
131 : IDS_FILE_SYSTEM_PROVIDER_MANY_UNRESPONSIVE_WARNING), 131 : IDS_FILE_SYSTEM_PROVIDER_MANY_UNRESPONSIVE_WARNING),
132 extension_icon_.get() ? *extension_icon_.get() : gfx::Image(), 132 extension_icon_.get() ? *extension_icon_.get() : gfx::Image(),
133 base::string16(), // display_source 133 base::string16(), // display_source
134 notifier_id, rich_notification_data, 134 GURL(), notifier_id, rich_notification_data,
135 new ProviderNotificationDelegate(this))); 135 new ProviderNotificationDelegate(this)));
136 136
137 notification->SetSystemPriority(); 137 notification->SetSystemPriority();
138 return notification.Pass(); 138 return notification.Pass();
139 } 139 }
140 140
141 void NotificationManager::OnNotificationResult(NotificationResult result) { 141 void NotificationManager::OnNotificationResult(NotificationResult result) {
142 CallbackMap::iterator it = callbacks_.begin(); 142 CallbackMap::iterator it = callbacks_.begin();
143 while (it != callbacks_.end()) { 143 while (it != callbacks_.end()) {
144 CallbackMap::iterator current_it = it++; 144 CallbackMap::iterator current_it = it++;
145 NotificationCallback callback = current_it->second; 145 NotificationCallback callback = current_it->second;
146 callbacks_.erase(current_it); 146 callbacks_.erase(current_it);
147 callback.Run(result); 147 callback.Run(result);
148 } 148 }
149 } 149 }
150 150
151 } // namespace file_system_provider 151 } // namespace file_system_provider
152 } // namespace chromeos 152 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698