mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add support for complete isolation of storage and permissions (cache, cookies, localStorage, access grants, etc) on a per-request-context basis (issue #1044).
- CefRequestContext instances can be configured using a new CefRequestContextSettings structure passed to CefRequestContext::CreateContext. - Scheme registration is now per-request-context using new CefRequestContext::RegisterSchemeHandlerFactory and ClearSchemeHandlerFactories methods. - Cookie managers are now per-request-context by default and can be retrieved using a new CefRequestContext::GetDefaultCookieManager method. - CefURLRequest::Create now accepts an optional CefRequestContext argument for associating a URL request with a context (browser process only). - The CefRequestContextHandler associated with a CefRequestContext will not be released until all objects related to that context have been destroyed. - When the cache path is empty an in-memory cache ("incognito mode") will be used for storage and no data will be persisted to disk. - Add CefSettings.user_data_path which specifies the location where user data such as spell checking dictionary files will be stored on disk. - Add asynchronous callbacks for all CefCookieManager methods. - Add PK_LOCAL_APP_DATA and PK_USER_DATA path keys for retrieving user directories via CefGetPath. - cefclient: Add "New Window" test that creates a new window unrelated to existing windows. When used in combination with `--request-context-per-browser` the new window will be given a new and isolated request context. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@2040 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
130
patch/patches/net_proxy_462624.patch
Normal file
130
patch/patches/net_proxy_462624.patch
Normal file
@@ -0,0 +1,130 @@
|
||||
diff --git proxy_config_service_linux.cc proxy_config_service_linux.cc
|
||||
index e0a9372..be8068d 100644
|
||||
--- proxy_config_service_linux.cc
|
||||
+++ proxy_config_service_linux.cc
|
||||
@@ -202,8 +202,11 @@ const int kDebounceTimeoutMilliseconds = 250;
|
||||
class SettingGetterImplGConf : public ProxyConfigServiceLinux::SettingGetter {
|
||||
public:
|
||||
SettingGetterImplGConf()
|
||||
- : client_(NULL), system_proxy_id_(0), system_http_proxy_id_(0),
|
||||
- notify_delegate_(NULL) {
|
||||
+ : client_(NULL),
|
||||
+ system_proxy_id_(0),
|
||||
+ system_http_proxy_id_(0),
|
||||
+ notify_delegate_(NULL),
|
||||
+ debounce_timer_(new base::OneShotTimer<SettingGetterImplGConf>()) {
|
||||
}
|
||||
|
||||
~SettingGetterImplGConf() override {
|
||||
@@ -287,6 +290,7 @@ class SettingGetterImplGConf : public ProxyConfigServiceLinux::SettingGetter {
|
||||
client_ = NULL;
|
||||
task_runner_ = NULL;
|
||||
}
|
||||
+ debounce_timer_.reset();
|
||||
}
|
||||
|
||||
bool SetUpNotifications(
|
||||
@@ -475,8 +479,8 @@ class SettingGetterImplGConf : public ProxyConfigServiceLinux::SettingGetter {
|
||||
void OnChangeNotification() {
|
||||
// We don't use Reset() because the timer may not yet be running.
|
||||
// (In that case Stop() is a no-op.)
|
||||
- debounce_timer_.Stop();
|
||||
- debounce_timer_.Start(FROM_HERE,
|
||||
+ debounce_timer_->Stop();
|
||||
+ debounce_timer_->Start(FROM_HERE,
|
||||
base::TimeDelta::FromMilliseconds(kDebounceTimeoutMilliseconds),
|
||||
this, &SettingGetterImplGConf::OnDebouncedNotification);
|
||||
}
|
||||
@@ -499,7 +503,7 @@ class SettingGetterImplGConf : public ProxyConfigServiceLinux::SettingGetter {
|
||||
guint system_http_proxy_id_;
|
||||
|
||||
ProxyConfigServiceLinux::Delegate* notify_delegate_;
|
||||
- base::OneShotTimer<SettingGetterImplGConf> debounce_timer_;
|
||||
+ scoped_ptr<base::OneShotTimer<SettingGetterImplGConf> > debounce_timer_;
|
||||
|
||||
// Task runner for the thread that we make gconf calls on. It should
|
||||
// be the UI thread and all our methods should be called on this
|
||||
@@ -523,7 +527,8 @@ class SettingGetterImplGSettings
|
||||
https_client_(NULL),
|
||||
ftp_client_(NULL),
|
||||
socks_client_(NULL),
|
||||
- notify_delegate_(NULL) {
|
||||
+ notify_delegate_(NULL),
|
||||
+ debounce_timer_(new base::OneShotTimer<SettingGetterImplGSettings>()) {
|
||||
}
|
||||
|
||||
~SettingGetterImplGSettings() override {
|
||||
@@ -598,6 +603,7 @@ class SettingGetterImplGSettings
|
||||
client_ = NULL;
|
||||
task_runner_ = NULL;
|
||||
}
|
||||
+ debounce_timer_.reset();
|
||||
}
|
||||
|
||||
bool SetUpNotifications(
|
||||
@@ -746,8 +752,8 @@ class SettingGetterImplGSettings
|
||||
void OnChangeNotification() {
|
||||
// We don't use Reset() because the timer may not yet be running.
|
||||
// (In that case Stop() is a no-op.)
|
||||
- debounce_timer_.Stop();
|
||||
- debounce_timer_.Start(FROM_HERE,
|
||||
+ debounce_timer_->Stop();
|
||||
+ debounce_timer_->Start(FROM_HERE,
|
||||
base::TimeDelta::FromMilliseconds(kDebounceTimeoutMilliseconds),
|
||||
this, &SettingGetterImplGSettings::OnDebouncedNotification);
|
||||
}
|
||||
@@ -768,7 +774,7 @@ class SettingGetterImplGSettings
|
||||
GSettings* ftp_client_;
|
||||
GSettings* socks_client_;
|
||||
ProxyConfigServiceLinux::Delegate* notify_delegate_;
|
||||
- base::OneShotTimer<SettingGetterImplGSettings> debounce_timer_;
|
||||
+ scoped_ptr<base::OneShotTimer<SettingGetterImplGSettings> > debounce_timer_;
|
||||
|
||||
// Task runner for the thread that we make gsettings calls on. It should
|
||||
// be the UI thread and all our methods should be called on this
|
||||
@@ -852,9 +858,14 @@ class SettingGetterImplKDE : public ProxyConfigServiceLinux::SettingGetter,
|
||||
public base::MessagePumpLibevent::Watcher {
|
||||
public:
|
||||
explicit SettingGetterImplKDE(base::Environment* env_var_getter)
|
||||
- : inotify_fd_(-1), notify_delegate_(NULL), indirect_manual_(false),
|
||||
- auto_no_pac_(false), reversed_bypass_list_(false),
|
||||
- env_var_getter_(env_var_getter), file_task_runner_(NULL) {
|
||||
+ : inotify_fd_(-1),
|
||||
+ notify_delegate_(NULL),
|
||||
+ debounce_timer_(new base::OneShotTimer<SettingGetterImplKDE>()),
|
||||
+ indirect_manual_(false),
|
||||
+ auto_no_pac_(false),
|
||||
+ reversed_bypass_list_(false),
|
||||
+ env_var_getter_(env_var_getter),
|
||||
+ file_task_runner_(NULL) {
|
||||
// This has to be called on the UI thread (http://crbug.com/69057).
|
||||
base::ThreadRestrictions::ScopedAllowIO allow_io;
|
||||
|
||||
@@ -956,6 +967,7 @@ class SettingGetterImplKDE : public ProxyConfigServiceLinux::SettingGetter,
|
||||
close(inotify_fd_);
|
||||
inotify_fd_ = -1;
|
||||
}
|
||||
+ debounce_timer_.reset();
|
||||
}
|
||||
|
||||
bool SetUpNotifications(
|
||||
@@ -1305,8 +1317,8 @@ class SettingGetterImplKDE : public ProxyConfigServiceLinux::SettingGetter,
|
||||
if (kioslaverc_touched) {
|
||||
// We don't use Reset() because the timer may not yet be running.
|
||||
// (In that case Stop() is a no-op.)
|
||||
- debounce_timer_.Stop();
|
||||
- debounce_timer_.Start(FROM_HERE, base::TimeDelta::FromMilliseconds(
|
||||
+ debounce_timer_->Stop();
|
||||
+ debounce_timer_->Start(FROM_HERE, base::TimeDelta::FromMilliseconds(
|
||||
kDebounceTimeoutMilliseconds), this,
|
||||
&SettingGetterImplKDE::OnDebouncedNotification);
|
||||
}
|
||||
@@ -1319,7 +1331,7 @@ class SettingGetterImplKDE : public ProxyConfigServiceLinux::SettingGetter,
|
||||
int inotify_fd_;
|
||||
base::MessagePumpLibevent::FileDescriptorWatcher inotify_watcher_;
|
||||
ProxyConfigServiceLinux::Delegate* notify_delegate_;
|
||||
- base::OneShotTimer<SettingGetterImplKDE> debounce_timer_;
|
||||
+ scoped_ptr<base::OneShotTimer<SettingGetterImplKDE> > debounce_timer_;
|
||||
base::FilePath kde_config_dir_;
|
||||
bool indirect_manual_;
|
||||
bool auto_no_pac_;
|
Reference in New Issue
Block a user