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

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

Issue 10831045: Add PP_FlashLSORestrictions to the list of settings supported by the Flash_GetSetting Pepper API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 4 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
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
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after
950 bool allow = cookie_settings->IsSettingCookieAllowed(url, first_party); 950 bool allow = cookie_settings->IsSettingCookieAllowed(url, first_party);
951 951
952 BrowserThread::PostTask( 952 BrowserThread::PostTask(
953 BrowserThread::UI, FROM_HERE, 953 BrowserThread::UI, FROM_HERE,
954 base::Bind(&TabSpecificContentSettings::CookieChanged, render_process_id, 954 base::Bind(&TabSpecificContentSettings::CookieChanged, render_process_id,
955 render_view_id, url, first_party, cookie_line, *options, 955 render_view_id, url, first_party, cookie_line, *options,
956 !allow)); 956 !allow));
957 return allow; 957 return allow;
958 } 958 }
959 959
960 bool ChromeContentBrowserClient::AllowPluginLocalDataAccess(
961 const GURL& document_url,
962 const GURL& plugin_url,
963 content::ResourceContext* context) {
964 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context);
viettrungluu 2012/08/01 13:57:14 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::I
Bernhard Bauer 2012/08/02 03:54:08 Done. We should probably have that check in Profil
965 return io_data->GetCookieSettings()->IsReadingCookieAllowed(document_url,
966 plugin_url);
967 }
968
969 bool ChromeContentBrowserClient::AllowPluginLocalDataSessionOnly(
970 const GURL& url,
971 content::ResourceContext* context) {
972 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context);
viettrungluu 2012/08/01 13:57:14 " ?
973 return io_data->GetCookieSettings()->IsCookieSessionOnly(url);
974 }
975
960 bool ChromeContentBrowserClient::AllowSaveLocalState( 976 bool ChromeContentBrowserClient::AllowSaveLocalState(
961 content::ResourceContext* context) { 977 content::ResourceContext* context) {
962 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 978 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
963 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); 979 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context);
964 CookieSettings* cookie_settings = io_data->GetCookieSettings(); 980 CookieSettings* cookie_settings = io_data->GetCookieSettings();
965 ContentSetting setting = cookie_settings->GetDefaultCookieSetting(NULL); 981 ContentSetting setting = cookie_settings->GetDefaultCookieSetting(NULL);
966 982
967 // TODO(bauerb): Should we also disallow local state if the default is BLOCK? 983 // TODO(bauerb): Should we also disallow local state if the default is BLOCK?
968 // Could we even support per-origin settings? 984 // Could we even support per-origin settings?
969 return setting != CONTENT_SETTING_SESSION_ONLY; 985 return setting != CONTENT_SETTING_SESSION_ONLY;
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
1663 io_thread_application_locale_ = locale; 1679 io_thread_application_locale_ = locale;
1664 } 1680 }
1665 1681
1666 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( 1682 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread(
1667 const std::string& locale) { 1683 const std::string& locale) {
1668 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 1684 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
1669 io_thread_application_locale_ = locale; 1685 io_thread_application_locale_ = locale;
1670 } 1686 }
1671 1687
1672 } // namespace chrome 1688 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698