Update to API changes of Chrome 51
This commit is contained in:
parent
05c2999651
commit
7ba391da7c
87 changed files with 225 additions and 231 deletions
|
@ -26,7 +26,7 @@ namespace internal {
|
|||
using BeforeStartCallback =
|
||||
base::Callback<void(v8::Isolate*, v8::Local<v8::Value>)>;
|
||||
using ResponseCallback =
|
||||
base::Callback<void(bool, scoped_ptr<base::Value> options)>;
|
||||
base::Callback<void(bool, std::unique_ptr<base::Value> options)>;
|
||||
|
||||
// Ask handler for options in UI thread.
|
||||
void AskForOptions(v8::Isolate* isolate,
|
||||
|
@ -58,7 +58,7 @@ class JsAsker : public RequestJob {
|
|||
|
||||
// Subclass should do initailze work here.
|
||||
virtual void BeforeStartInUI(v8::Isolate*, v8::Local<v8::Value>) {}
|
||||
virtual void StartAsync(scoped_ptr<base::Value> options) = 0;
|
||||
virtual void StartAsync(std::unique_ptr<base::Value> options) = 0;
|
||||
|
||||
net::URLRequestContextGetter* request_context_getter() const {
|
||||
return request_context_getter_;
|
||||
|
@ -84,7 +84,7 @@ class JsAsker : public RequestJob {
|
|||
|
||||
// Called when the JS handler has sent the response, we need to decide whether
|
||||
// to start, or fail the job.
|
||||
void OnResponse(bool success, scoped_ptr<base::Value> value) {
|
||||
void OnResponse(bool success, std::unique_ptr<base::Value> value) {
|
||||
int error = net::ERR_NOT_IMPLEMENTED;
|
||||
if (success && value && !internal::IsErrorOptions(value.get(), &error)) {
|
||||
StartAsync(std::move(value));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue