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/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1678 DesktopNotificationServiceFactory::GetForProfile(profile); | 1678 DesktopNotificationServiceFactory::GetForProfile(profile); |
1679 const Extension* extension = NULL; | 1679 const Extension* extension = NULL; |
1680 if (extension_info_map) { | 1680 if (extension_info_map) { |
1681 ExtensionSet extensions; | 1681 ExtensionSet extensions; |
1682 extension_info_map->GetExtensionsWithAPIPermissionForSecurityOrigin( | 1682 extension_info_map->GetExtensionsWithAPIPermissionForSecurityOrigin( |
1683 source_origin, render_process_id, | 1683 source_origin, render_process_id, |
1684 extensions::APIPermission::kNotification, &extensions); | 1684 extensions::APIPermission::kNotification, &extensions); |
1685 for (ExtensionSet::const_iterator iter = extensions.begin(); | 1685 for (ExtensionSet::const_iterator iter = extensions.begin(); |
1686 iter != extensions.end(); ++iter) { | 1686 iter != extensions.end(); ++iter) { |
1687 if (notification_service->IsExtensionEnabled((*iter)->id())) { | 1687 if (notification_service->IsExtensionEnabled((*iter)->id())) { |
1688 extension = *iter; | 1688 extension = iter->get(); |
1689 break; | 1689 break; |
1690 } | 1690 } |
1691 } | 1691 } |
1692 } | 1692 } |
1693 RenderViewHost* rvh = | 1693 RenderViewHost* rvh = |
1694 RenderViewHost::FromID(render_process_id, render_view_id); | 1694 RenderViewHost::FromID(render_process_id, render_view_id); |
1695 if (IsExtensionWithPermissionOrSuggestInConsole( | 1695 if (IsExtensionWithPermissionOrSuggestInConsole( |
1696 APIPermission::kNotification, extension, rvh)) { | 1696 APIPermission::kNotification, extension, rvh)) { |
1697 if (rvh) | 1697 if (rvh) |
1698 rvh->DesktopNotificationPermissionRequestDone(callback_context); | 1698 rvh->DesktopNotificationPermissionRequestDone(callback_context); |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1971 if (keyboard_driven_oobe) | 1971 if (keyboard_driven_oobe) |
1972 web_prefs->password_echo_enabled = true; | 1972 web_prefs->password_echo_enabled = true; |
1973 } | 1973 } |
1974 #endif | 1974 #endif |
1975 | 1975 |
1976 #if defined(OS_ANDROID) | 1976 #if defined(OS_ANDROID) |
1977 web_prefs->user_style_sheet_enabled = false; | 1977 web_prefs->user_style_sheet_enabled = false; |
1978 #else | 1978 #else |
1979 // The user stylesheet watcher may not exist in a testing profile. | 1979 // The user stylesheet watcher may not exist in a testing profile. |
1980 UserStyleSheetWatcher* user_style_sheet_watcher = | 1980 UserStyleSheetWatcher* user_style_sheet_watcher = |
1981 UserStyleSheetWatcherFactory::GetForProfile(profile); | 1981 UserStyleSheetWatcherFactory::GetForProfile(profile).get(); |
1982 if (user_style_sheet_watcher) { | 1982 if (user_style_sheet_watcher) { |
1983 web_prefs->user_style_sheet_enabled = true; | 1983 web_prefs->user_style_sheet_enabled = true; |
1984 web_prefs->user_style_sheet_location = | 1984 web_prefs->user_style_sheet_location = |
1985 user_style_sheet_watcher->user_style_sheet(); | 1985 user_style_sheet_watcher->user_style_sheet(); |
1986 } else { | 1986 } else { |
1987 web_prefs->user_style_sheet_enabled = false; | 1987 web_prefs->user_style_sheet_enabled = false; |
1988 } | 1988 } |
1989 #endif | 1989 #endif |
1990 | 1990 |
1991 web_prefs->asynchronous_spell_checking_enabled = true; | 1991 web_prefs->asynchronous_spell_checking_enabled = true; |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2297 #if defined(USE_NSS) | 2297 #if defined(USE_NSS) |
2298 crypto::CryptoModuleBlockingPasswordDelegate* | 2298 crypto::CryptoModuleBlockingPasswordDelegate* |
2299 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 2299 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
2300 const GURL& url) { | 2300 const GURL& url) { |
2301 return chrome::NewCryptoModuleBlockingDialogDelegate( | 2301 return chrome::NewCryptoModuleBlockingDialogDelegate( |
2302 chrome::kCryptoModulePasswordKeygen, url.host()); | 2302 chrome::kCryptoModulePasswordKeygen, url.host()); |
2303 } | 2303 } |
2304 #endif | 2304 #endif |
2305 | 2305 |
2306 } // namespace chrome | 2306 } // namespace chrome |
OLD | NEW |