OLD | NEW |
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/status_icons/desktop_notification_balloon.h" | 5 #include "chrome/browser/status_icons/desktop_notification_balloon.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
9 #include "base/threading/thread_restrictions.h" | 9 #include "base/threading/thread_restrictions.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 const string16& contents) { | 76 const string16& contents) { |
77 // Allowing IO access is required here to cover the corner case where | 77 // Allowing IO access is required here to cover the corner case where |
78 // there is no last used profile and the default one is loaded. | 78 // there is no last used profile and the default one is loaded. |
79 // IO access won't be required for normal uses. | 79 // IO access won't be required for normal uses. |
80 Profile* profile; | 80 Profile* profile; |
81 { | 81 { |
82 base::ThreadRestrictions::ScopedAllowIO allow_io; | 82 base::ThreadRestrictions::ScopedAllowIO allow_io; |
83 profile = ProfileManager::GetLastUsedProfile(); | 83 profile = ProfileManager::GetLastUsedProfile(); |
84 } | 84 } |
85 notification_id_ = DesktopNotificationService::AddIconNotification( | 85 notification_id_ = DesktopNotificationService::AddIconNotification( |
86 GURL(), title, contents, gfx::ImageSkia(icon), | 86 GURL(), title, contents, gfx::ImageSkia(icon), string16(), |
87 new DummyNotificationDelegate(base::IntToString(id_count_++)), profile); | 87 new DummyNotificationDelegate(base::IntToString(id_count_++)), profile); |
88 } | 88 } |
OLD | NEW |