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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 281903002: Remove obsolete kiosk new window blocking code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove header Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/lazy_instance.h" 13 #include "base/lazy_instance.h"
14 #include "base/path_service.h" 14 #include "base/path_service.h"
15 #include "base/prefs/pref_service.h" 15 #include "base/prefs/pref_service.h"
16 #include "base/prefs/scoped_user_pref_update.h" 16 #include "base/prefs/scoped_user_pref_update.h"
17 #include "base/strings/string_number_conversions.h" 17 #include "base/strings/string_number_conversions.h"
18 #include "base/strings/utf_string_conversions.h" 18 #include "base/strings/utf_string_conversions.h"
19 #include "base/threading/sequenced_worker_pool.h" 19 #include "base/threading/sequenced_worker_pool.h"
20 #include "chrome/browser/app_mode/app_mode_utils.h"
21 #include "chrome/browser/browser_about_handler.h" 20 #include "chrome/browser/browser_about_handler.h"
22 #include "chrome/browser/browser_process.h" 21 #include "chrome/browser/browser_process.h"
23 #include "chrome/browser/browser_shutdown.h" 22 #include "chrome/browser/browser_shutdown.h"
24 #include "chrome/browser/browsing_data/browsing_data_helper.h" 23 #include "chrome/browser/browsing_data/browsing_data_helper.h"
25 #include "chrome/browser/browsing_data/browsing_data_remover.h" 24 #include "chrome/browser/browsing_data/browsing_data_remover.h"
26 #include "chrome/browser/character_encoding.h" 25 #include "chrome/browser/character_encoding.h"
27 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" 26 #include "chrome/browser/chrome_net_benchmarking_message_filter.h"
28 #include "chrome/browser/chrome_quota_permission_context.h" 27 #include "chrome/browser/chrome_quota_permission_context.h"
29 #include "chrome/browser/content_settings/content_settings_utils.h" 28 #include "chrome/browser/content_settings/content_settings_utils.h"
30 #include "chrome/browser/content_settings/cookie_settings.h" 29 #include "chrome/browser/content_settings/cookie_settings.h"
(...skipping 2113 matching lines...) Expand 10 before | Expand all | Expand 10 after
2144 // already. We must use the full URL to find hosted apps, though, and not 2143 // already. We must use the full URL to find hosted apps, though, and not
2145 // just the origin. 2144 // just the origin.
2146 const Extension* extension = 2145 const Extension* extension =
2147 map->extensions().GetExtensionOrAppByURL(opener_url); 2146 map->extensions().GetExtensionOrAppByURL(opener_url);
2148 if (extension && !extensions::BackgroundInfo::AllowJSAccess(extension)) 2147 if (extension && !extensions::BackgroundInfo::AllowJSAccess(extension))
2149 *no_javascript_access = true; 2148 *no_javascript_access = true;
2150 2149
2151 return true; 2150 return true;
2152 } 2151 }
2153 2152
2154 // No new browser window (popup or tab) in app mode.
2155 if (container_type == WINDOW_CONTAINER_TYPE_NORMAL &&
2156 chrome::IsRunningInForcedAppMode()) {
2157 return false;
2158 }
2159
2160 if (is_guest) 2153 if (is_guest)
2161 return true; 2154 return true;
2162 2155
2163 HostContentSettingsMap* content_settings = 2156 HostContentSettingsMap* content_settings =
2164 ProfileIOData::FromResourceContext(context)->GetHostContentSettingsMap(); 2157 ProfileIOData::FromResourceContext(context)->GetHostContentSettingsMap();
2165 BlockedWindowParams blocked_params(target_url, 2158 BlockedWindowParams blocked_params(target_url,
2166 referrer, 2159 referrer,
2167 disposition, 2160 disposition,
2168 features, 2161 features,
2169 user_gesture, 2162 user_gesture,
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
2715 switches::kDisableWebRtcEncryption, 2708 switches::kDisableWebRtcEncryption,
2716 }; 2709 };
2717 to_command_line->CopySwitchesFrom(from_command_line, 2710 to_command_line->CopySwitchesFrom(from_command_line,
2718 kWebRtcDevSwitchNames, 2711 kWebRtcDevSwitchNames,
2719 arraysize(kWebRtcDevSwitchNames)); 2712 arraysize(kWebRtcDevSwitchNames));
2720 } 2713 }
2721 } 2714 }
2722 #endif // defined(ENABLE_WEBRTC) 2715 #endif // defined(ENABLE_WEBRTC)
2723 2716
2724 } // namespace chrome 2717 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698