| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" | 87 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" |
| 88 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" | 88 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" |
| 89 #include "chrome/browser/user_style_sheet_watcher.h" | 89 #include "chrome/browser/user_style_sheet_watcher.h" |
| 90 #include "chrome/browser/user_style_sheet_watcher_factory.h" | 90 #include "chrome/browser/user_style_sheet_watcher_factory.h" |
| 91 #include "chrome/browser/validation_message_message_filter.h" | 91 #include "chrome/browser/validation_message_message_filter.h" |
| 92 #include "chrome/common/chrome_constants.h" | 92 #include "chrome/common/chrome_constants.h" |
| 93 #include "chrome/common/chrome_paths.h" | 93 #include "chrome/common/chrome_paths.h" |
| 94 #include "chrome/common/chrome_switches.h" | 94 #include "chrome/common/chrome_switches.h" |
| 95 #include "chrome/common/chrome_version_info.h" | 95 #include "chrome/common/chrome_version_info.h" |
| 96 #include "chrome/common/env_vars.h" | 96 #include "chrome/common/env_vars.h" |
| 97 #include "chrome/common/extensions/background_info.h" | |
| 98 #include "chrome/common/extensions/extension.h" | 97 #include "chrome/common/extensions/extension.h" |
| 99 #include "chrome/common/extensions/extension_process_policy.h" | 98 #include "chrome/common/extensions/extension_process_policy.h" |
| 100 #include "chrome/common/extensions/extension_set.h" | 99 #include "chrome/common/extensions/extension_set.h" |
| 101 #include "chrome/common/extensions/manifest_handlers/app_isolation_info.h" | 100 #include "chrome/common/extensions/manifest_handlers/app_isolation_info.h" |
| 102 #include "chrome/common/extensions/manifest_handlers/shared_module_info.h" | 101 #include "chrome/common/extensions/manifest_handlers/shared_module_info.h" |
| 103 #include "chrome/common/extensions/permissions/permissions_data.h" | 102 #include "chrome/common/extensions/permissions/permissions_data.h" |
| 104 #include "chrome/common/extensions/permissions/socket_permission.h" | 103 #include "chrome/common/extensions/permissions/socket_permission.h" |
| 105 #include "chrome/common/extensions/web_accessible_resources_handler.h" | 104 #include "chrome/common/extensions/web_accessible_resources_handler.h" |
| 106 #include "chrome/common/logging_chrome.h" | 105 #include "chrome/common/logging_chrome.h" |
| 107 #include "chrome/common/pepper_permission_util.h" | 106 #include "chrome/common/pepper_permission_util.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 125 #include "content/public/browser/render_view_host.h" | 124 #include "content/public/browser/render_view_host.h" |
| 126 #include "content/public/browser/resource_context.h" | 125 #include "content/public/browser/resource_context.h" |
| 127 #include "content/public/browser/site_instance.h" | 126 #include "content/public/browser/site_instance.h" |
| 128 #include "content/public/browser/web_contents.h" | 127 #include "content/public/browser/web_contents.h" |
| 129 #include "content/public/browser/web_contents_view.h" | 128 #include "content/public/browser/web_contents_view.h" |
| 130 #include "content/public/common/child_process_host.h" | 129 #include "content/public/common/child_process_host.h" |
| 131 #include "content/public/common/content_descriptors.h" | 130 #include "content/public/common/content_descriptors.h" |
| 132 #include "content/public/common/url_utils.h" | 131 #include "content/public/common/url_utils.h" |
| 133 #include "extensions/browser/view_type_utils.h" | 132 #include "extensions/browser/view_type_utils.h" |
| 134 #include "extensions/common/constants.h" | 133 #include "extensions/common/constants.h" |
| 134 #include "extensions/common/manifest_handlers/background_info.h" |
| 135 #include "extensions/common/switches.h" | 135 #include "extensions/common/switches.h" |
| 136 #include "grit/generated_resources.h" | 136 #include "grit/generated_resources.h" |
| 137 #include "grit/ui_resources.h" | 137 #include "grit/ui_resources.h" |
| 138 #include "net/base/escape.h" | 138 #include "net/base/escape.h" |
| 139 #include "net/base/mime_util.h" | 139 #include "net/base/mime_util.h" |
| 140 #include "net/cookies/canonical_cookie.h" | 140 #include "net/cookies/canonical_cookie.h" |
| 141 #include "net/cookies/cookie_options.h" | 141 #include "net/cookies/cookie_options.h" |
| 142 #include "net/ssl/ssl_cert_request_info.h" | 142 #include "net/ssl/ssl_cert_request_info.h" |
| 143 #include "ppapi/host/ppapi_host.h" | 143 #include "ppapi/host/ppapi_host.h" |
| 144 #include "ui/base/l10n/l10n_util.h" | 144 #include "ui/base/l10n/l10n_util.h" |
| (...skipping 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1494 command_line->AppendSwitch(switches::kDisableHTMLNotifications); | 1494 command_line->AppendSwitch(switches::kDisableHTMLNotifications); |
| 1495 | 1495 |
| 1496 // Please keep this in alphabetical order. | 1496 // Please keep this in alphabetical order. |
| 1497 static const char* const kSwitchNames[] = { | 1497 static const char* const kSwitchNames[] = { |
| 1498 autofill::switches::kDisableInteractiveAutocomplete, | 1498 autofill::switches::kDisableInteractiveAutocomplete, |
| 1499 autofill::switches::kDisablePasswordGeneration, | 1499 autofill::switches::kDisablePasswordGeneration, |
| 1500 autofill::switches::kEnableExperimentalFormFilling, | 1500 autofill::switches::kEnableExperimentalFormFilling, |
| 1501 autofill::switches::kEnableInteractiveAutocomplete, | 1501 autofill::switches::kEnableInteractiveAutocomplete, |
| 1502 autofill::switches::kEnablePasswordGeneration, | 1502 autofill::switches::kEnablePasswordGeneration, |
| 1503 autofill::switches::kNoAutofillNecessaryForPasswordGeneration, | 1503 autofill::switches::kNoAutofillNecessaryForPasswordGeneration, |
| 1504 extensions::switches::kAllowHTTPBackgroundPage, |
| 1504 extensions::switches::kAllowLegacyExtensionManifests, | 1505 extensions::switches::kAllowLegacyExtensionManifests, |
| 1505 extensions::switches::kAllowScriptingGallery, | 1506 extensions::switches::kAllowScriptingGallery, |
| 1506 extensions::switches::kEnableExperimentalExtensionApis, | 1507 extensions::switches::kEnableExperimentalExtensionApis, |
| 1507 extensions::switches::kExtensionsOnChromeURLs, | 1508 extensions::switches::kExtensionsOnChromeURLs, |
| 1508 switches::kAllowHTTPBackgroundPage, | |
| 1509 // TODO(victorhsieh): remove the following flag once we move PPAPI FileIO | 1509 // TODO(victorhsieh): remove the following flag once we move PPAPI FileIO |
| 1510 // to browser. | 1510 // to browser. |
| 1511 switches::kAllowNaClFileHandleAPI, | 1511 switches::kAllowNaClFileHandleAPI, |
| 1512 switches::kAppsCheckoutURL, | 1512 switches::kAppsCheckoutURL, |
| 1513 switches::kAppsGalleryURL, | 1513 switches::kAppsGalleryURL, |
| 1514 switches::kCloudPrintServiceURL, | 1514 switches::kCloudPrintServiceURL, |
| 1515 switches::kDebugPrint, | 1515 switches::kDebugPrint, |
| 1516 switches::kDisableBundledPpapiFlash, | 1516 switches::kDisableBundledPpapiFlash, |
| 1517 switches::kDisableExtensionsResourceWhitelist, | 1517 switches::kDisableExtensionsResourceWhitelist, |
| 1518 switches::kDisablePnacl, | 1518 switches::kDisablePnacl, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1539 switches::kSilentDumpOnDCHECK, | 1539 switches::kSilentDumpOnDCHECK, |
| 1540 switches::kSpdyProxyAuthOrigin, | 1540 switches::kSpdyProxyAuthOrigin, |
| 1541 switches::kWhitelistedExtensionID, | 1541 switches::kWhitelistedExtensionID, |
| 1542 translate::switches::kTranslateSecurityOrigin, | 1542 translate::switches::kTranslateSecurityOrigin, |
| 1543 }; | 1543 }; |
| 1544 | 1544 |
| 1545 command_line->CopySwitchesFrom(browser_command_line, kSwitchNames, | 1545 command_line->CopySwitchesFrom(browser_command_line, kSwitchNames, |
| 1546 arraysize(kSwitchNames)); | 1546 arraysize(kSwitchNames)); |
| 1547 } else if (process_type == switches::kUtilityProcess) { | 1547 } else if (process_type == switches::kUtilityProcess) { |
| 1548 static const char* const kSwitchNames[] = { | 1548 static const char* const kSwitchNames[] = { |
| 1549 extensions::switches::kAllowHTTPBackgroundPage, |
| 1549 extensions::switches::kEnableExperimentalExtensionApis, | 1550 extensions::switches::kEnableExperimentalExtensionApis, |
| 1550 extensions::switches::kExtensionsOnChromeURLs, | 1551 extensions::switches::kExtensionsOnChromeURLs, |
| 1551 switches::kAllowHTTPBackgroundPage, | |
| 1552 switches::kWhitelistedExtensionID, | 1552 switches::kWhitelistedExtensionID, |
| 1553 }; | 1553 }; |
| 1554 | 1554 |
| 1555 command_line->CopySwitchesFrom(browser_command_line, kSwitchNames, | 1555 command_line->CopySwitchesFrom(browser_command_line, kSwitchNames, |
| 1556 arraysize(kSwitchNames)); | 1556 arraysize(kSwitchNames)); |
| 1557 } else if (process_type == switches::kPluginProcess) { | 1557 } else if (process_type == switches::kPluginProcess) { |
| 1558 static const char* const kSwitchNames[] = { | 1558 static const char* const kSwitchNames[] = { |
| 1559 #if defined(OS_CHROMEOS) | 1559 #if defined(OS_CHROMEOS) |
| 1560 chromeos::switches::kLoginProfile, | 1560 chromeos::switches::kLoginProfile, |
| 1561 #endif | 1561 #endif |
| (...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2644 return IsExtensionOrSharedModuleWhitelisted(url, extension_set, | 2644 return IsExtensionOrSharedModuleWhitelisted(url, extension_set, |
| 2645 allowed_file_handle_origins_) || | 2645 allowed_file_handle_origins_) || |
| 2646 IsHostAllowedByCommandLine(url, extension_set, | 2646 IsHostAllowedByCommandLine(url, extension_set, |
| 2647 switches::kAllowNaClFileHandleAPI); | 2647 switches::kAllowNaClFileHandleAPI); |
| 2648 #else | 2648 #else |
| 2649 return false; | 2649 return false; |
| 2650 #endif | 2650 #endif |
| 2651 } | 2651 } |
| 2652 | 2652 |
| 2653 } // namespace chrome | 2653 } // namespace chrome |
| OLD | NEW |