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

Side by Side Diff: chrome/browser/extensions/api/file_system/request_file_system_notification.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/extensions/api/file_system/request_file_system_notifica tion.h" 5 #include "chrome/browser/extensions/api/file_system/request_file_system_notifica tion.h"
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 writable 51 writable
52 ? IDS_FILE_SYSTEM_REQUEST_FILE_SYSTEM_NOTIFICATION_WRITABLE_MESSAGE 52 ? IDS_FILE_SYSTEM_REQUEST_FILE_SYSTEM_NOTIFICATION_WRITABLE_MESSAGE
53 : IDS_FILE_SYSTEM_REQUEST_FILE_SYSTEM_NOTIFICATION_MESSAGE, 53 : IDS_FILE_SYSTEM_REQUEST_FILE_SYSTEM_NOTIFICATION_MESSAGE,
54 display_name); 54 display_name);
55 55
56 scoped_ptr<Notification> notification(new Notification( 56 scoped_ptr<Notification> notification(new Notification(
57 message_center::NOTIFICATION_TYPE_SIMPLE, notification_id, 57 message_center::NOTIFICATION_TYPE_SIMPLE, notification_id,
58 base::UTF8ToUTF16(extension.name()), message, 58 base::UTF8ToUTF16(extension.name()), message,
59 gfx::Image(), // Updated asynchronously later. 59 gfx::Image(), // Updated asynchronously later.
60 base::string16(), // display_source 60 base::string16(), // display_source
61 GURL(),
61 message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT, 62 message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT,
62 notification_id), 63 notification_id),
63 data, delegate)); 64 data, delegate));
64 65
65 return notification.Pass(); 66 return notification.Pass();
66 } 67 }
67 68
68 } // namespace 69 } // namespace
69 70
70 // static 71 // static
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 pending_notification_.reset(notification.release()); 114 pending_notification_.reset(notification.release());
114 // If the extension icon is not known yet, then defer showing the notification 115 // If the extension icon is not known yet, then defer showing the notification
115 // until it is (from SetAppImage). 116 // until it is (from SetAppImage).
116 if (!extension_icon_.get()) 117 if (!extension_icon_.get())
117 return; 118 return;
118 119
119 pending_notification_->set_icon(*extension_icon_.get()); 120 pending_notification_->set_icon(*extension_icon_.get());
120 g_browser_process->message_center()->AddNotification( 121 g_browser_process->message_center()->AddNotification(
121 pending_notification_.Pass()); 122 pending_notification_.Pass());
122 } 123 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698