jerrard123 / phpdesktop

Automatically exported from code.google.com/p/phpdesktop
0 stars 0 forks source link

HTML5 persistent storage - quota requests are denied #107

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Need to implement CefRequestHandler::OnQuotaRequest:

  ///
  // Called on the IO thread when JavaScript requests a specific storage quota
  // size via the webkitStorageInfo.requestQuota function. |origin_url| is the
  // origin of the page making the request. |new_size| is the requested quota
  // size in bytes. Return true and call CefQuotaCallback::Continue() either in
  // this method or at a later time to grant or deny the request. Return false
  // to cancel the request.
  ///
  /*--cef(optional_param=realm)--*/
  virtual bool OnQuotaRequest(CefRefPtr<CefBrowser> browser,
                              const CefString& origin_url,
                              int64 new_size,
                              CefRefPtr<CefQuotaCallback> callback) {
    return false;
  } 

Original issue reported on code.google.com by czarek.t...@gmail.com on 2 May 2014 at 6:26

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
A javascript example for requesting additional space for local storage or 
indexed db:

https://code.google.com/p/phpdesktop/source/browse/phpdesktop-chrome/www/request
-quota.php?r=a08269c0e01b

Currently it doesn't work, the result is "Granted 0 bytes". OnQuotaRequest 
needs to be implemented to fix this.

Shall we allow all quota requests? Or should it be configurable through 
settings.json? For 127.0.0.1 all requests should be allowed. For other internet 
domains a limit in the settings.json file may be a good idea.

Original comment by czarek.t...@gmail.com on 3 May 2014 at 8:03

GoogleCodeExporter commented 9 years ago

Original comment by czarek.t...@gmail.com on 13 Oct 2014 at 6:57

GoogleCodeExporter commented 9 years ago

Original comment by czarek.t...@gmail.com on 21 Oct 2014 at 10:39