| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/notifications/desktop_notification_service.h" | 5 #include "chrome/browser/notifications/desktop_notification_service.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "base/string_piece.h" | |
| 10 #include "base/string_util.h" | |
| 11 #include "base/thread.h" | 9 #include "base/thread.h" |
| 10 #include "base/utf_string_conversions.h" |
| 12 #include "chrome/browser/browser_list.h" | 11 #include "chrome/browser/browser_list.h" |
| 13 #include "chrome/browser/chrome_thread.h" | 12 #include "chrome/browser/chrome_thread.h" |
| 14 #include "chrome/browser/extensions/extensions_service.h" | 13 #include "chrome/browser/extensions/extensions_service.h" |
| 15 #include "chrome/browser/notifications/notification.h" | 14 #include "chrome/browser/notifications/notification.h" |
| 16 #include "chrome/browser/notifications/notification_object_proxy.h" | 15 #include "chrome/browser/notifications/notification_object_proxy.h" |
| 17 #include "chrome/browser/notifications/notification_ui_manager.h" | 16 #include "chrome/browser/notifications/notification_ui_manager.h" |
| 18 #include "chrome/browser/notifications/notifications_prefs_cache.h" | 17 #include "chrome/browser/notifications/notifications_prefs_cache.h" |
| 19 #include "chrome/browser/profile.h" | 18 #include "chrome/browser/profile.h" |
| 20 #include "chrome/browser/renderer_host/render_process_host.h" | 19 #include "chrome/browser/renderer_host/render_process_host.h" |
| 21 #include "chrome/browser/renderer_host/render_view_host.h" | 20 #include "chrome/browser/renderer_host/render_view_host.h" |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 if (origin.SchemeIs(chrome::kExtensionScheme)) { | 360 if (origin.SchemeIs(chrome::kExtensionScheme)) { |
| 362 ExtensionsService* ext_service = profile_->GetExtensionsService(); | 361 ExtensionsService* ext_service = profile_->GetExtensionsService(); |
| 363 if (ext_service) { | 362 if (ext_service) { |
| 364 Extension* extension = ext_service->GetExtensionByURL(origin); | 363 Extension* extension = ext_service->GetExtensionByURL(origin); |
| 365 if (extension) | 364 if (extension) |
| 366 return ASCIIToWide(extension->name()); | 365 return ASCIIToWide(extension->name()); |
| 367 } | 366 } |
| 368 } | 367 } |
| 369 return UTF8ToWide(origin.spec()); | 368 return UTF8ToWide(origin.spec()); |
| 370 } | 369 } |
| OLD | NEW |