| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 #endif // OS_WIN | 10 #endif // OS_WIN |
| (...skipping 2221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2232 prefs->RegisterBooleanPref(prefs::kPluginsAlwaysAuthorize, | 2232 prefs->RegisterBooleanPref(prefs::kPluginsAlwaysAuthorize, |
| 2233 false, | 2233 false, |
| 2234 PrefService::UNSYNCABLE_PREF); | 2234 PrefService::UNSYNCABLE_PREF); |
| 2235 prefs->RegisterBooleanPref(prefs::kEnableHyperlinkAuditing, | 2235 prefs->RegisterBooleanPref(prefs::kEnableHyperlinkAuditing, |
| 2236 true, | 2236 true, |
| 2237 PrefService::UNSYNCABLE_PREF); | 2237 PrefService::UNSYNCABLE_PREF); |
| 2238 prefs->RegisterBooleanPref(prefs::kEnableReferrers, | 2238 prefs->RegisterBooleanPref(prefs::kEnableReferrers, |
| 2239 true, | 2239 true, |
| 2240 PrefService::UNSYNCABLE_PREF); | 2240 PrefService::UNSYNCABLE_PREF); |
| 2241 prefs->RegisterBooleanPref(prefs::kWebKitAllowRunningInsecureContent, | 2241 prefs->RegisterBooleanPref(prefs::kWebKitAllowRunningInsecureContent, |
| 2242 true, | 2242 false, |
| 2243 PrefService::UNSYNCABLE_PREF); | 2243 PrefService::UNSYNCABLE_PREF); |
| 2244 prefs->RegisterBooleanPref(prefs::kWebKitAllowDisplayingInsecureContent, | 2244 prefs->RegisterBooleanPref(prefs::kWebKitAllowDisplayingInsecureContent, |
| 2245 true, | 2245 true, |
| 2246 PrefService::UNSYNCABLE_PREF); | 2246 PrefService::UNSYNCABLE_PREF); |
| 2247 } | 2247 } |
| 2248 | 2248 |
| 2249 // static | 2249 // static |
| 2250 bool Browser::RunUnloadEventsHelper(TabContents* contents) { | 2250 bool Browser::RunUnloadEventsHelper(TabContents* contents) { |
| 2251 // If the TabContents is not connected yet, then there's no unload | 2251 // If the TabContents is not connected yet, then there's no unload |
| 2252 // handler we can fire even if the TabContents has an unload listener. | 2252 // handler we can fire even if the TabContents has an unload listener. |
| (...skipping 2420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4673 TabContents* current_tab = GetSelectedTabContents(); | 4673 TabContents* current_tab = GetSelectedTabContents(); |
| 4674 if (current_tab) { | 4674 if (current_tab) { |
| 4675 content_restrictions = current_tab->content_restrictions(); | 4675 content_restrictions = current_tab->content_restrictions(); |
| 4676 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry(); | 4676 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry(); |
| 4677 // See comment in UpdateCommandsForTabState about why we call url(). | 4677 // See comment in UpdateCommandsForTabState about why we call url(). |
| 4678 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL())) | 4678 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL())) |
| 4679 content_restrictions |= CONTENT_RESTRICTION_SAVE; | 4679 content_restrictions |= CONTENT_RESTRICTION_SAVE; |
| 4680 } | 4680 } |
| 4681 return content_restrictions; | 4681 return content_restrictions; |
| 4682 } | 4682 } |
| OLD | NEW |