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

Side by Side Diff: chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc

Issue 10824265: Correctly remove file browser notifications from Ash notification tray. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/printing/cloud_print/cloud_print_proxy_service.h" 5 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
6 6
7 #include <stack> 7 #include <stack>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // If we already have a pending notification, don't show another one. 137 // If we already have a pending notification, don't show another one.
138 if (token_expired_delegate_.get()) 138 if (token_expired_delegate_.get())
139 return false; 139 return false;
140 140
141 // TODO(sanjeevr): Get icon for this notification. crbug.com/132848. 141 // TODO(sanjeevr): Get icon for this notification. crbug.com/132848.
142 string16 title = l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT); 142 string16 title = l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT);
143 string16 message = 143 string16 message =
144 l10n_util::GetStringFUTF16(IDS_CLOUD_PRINT_TOKEN_EXPIRED_MESSAGE, title); 144 l10n_util::GetStringFUTF16(IDS_CLOUD_PRINT_TOKEN_EXPIRED_MESSAGE, title);
145 token_expired_delegate_ = new TokenExpiredNotificationDelegate(this); 145 token_expired_delegate_ = new TokenExpiredNotificationDelegate(this);
146 DesktopNotificationService::AddNotification( 146 DesktopNotificationService::AddNotification(
147 GURL(), title, message, GURL(), 147 GURL(), title, message, GURL(), string16(),
148 token_expired_delegate_.get(), profile_); 148 token_expired_delegate_.get(), profile_);
149 // Keep the browser alive while we are showing the notification. 149 // Keep the browser alive while we are showing the notification.
150 browser::StartKeepAlive(); 150 browser::StartKeepAlive();
151 return true; 151 return true;
152 } 152 }
153 153
154 void CloudPrintProxyService::OnTokenExpiredNotificationError() { 154 void CloudPrintProxyService::OnTokenExpiredNotificationError() {
155 TokenExpiredNotificationDone(false); 155 TokenExpiredNotificationDone(false);
156 } 156 }
157 157
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 } 265 }
266 266
267 bool CloudPrintProxyService::InvokeServiceTask(const base::Closure& task) { 267 bool CloudPrintProxyService::InvokeServiceTask(const base::Closure& task) {
268 GetServiceProcessControl()->Launch(task, base::Closure()); 268 GetServiceProcessControl()->Launch(task, base::Closure());
269 return true; 269 return true;
270 } 270 }
271 271
272 ServiceProcessControl* CloudPrintProxyService::GetServiceProcessControl() { 272 ServiceProcessControl* CloudPrintProxyService::GetServiceProcessControl() {
273 return ServiceProcessControl::GetInstance(); 273 return ServiceProcessControl::GetInstance();
274 } 274 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698