diff options
Diffstat (limited to 'android/autofill')
-rw-r--r-- | android/autofill/android_url_request_context_getter.cc | 7 | ||||
-rw-r--r-- | android/autofill/android_url_request_context_getter.h | 8 |
2 files changed, 6 insertions, 9 deletions
diff --git a/android/autofill/android_url_request_context_getter.cc b/android/autofill/android_url_request_context_getter.cc index 9e602cb..5038cd6 100644 --- a/android/autofill/android_url_request_context_getter.cc +++ b/android/autofill/android_url_request_context_getter.cc @@ -30,7 +30,7 @@ scoped_refptr<AndroidURLRequestContextGetter> AndroidURLRequestContextGetter::in URLRequestContext* AndroidURLRequestContextGetter::GetURLRequestContext() { - return (*context_getter_function_)(); + return context_; } scoped_refptr<base::MessageLoopProxy> AndroidURLRequestContextGetter::GetIOMessageLoopProxy() const @@ -56,8 +56,7 @@ AndroidURLRequestContextGetter* AndroidURLRequestContextGetter::Get() return instance_; } -void AndroidURLRequestContextGetter::SetURLRequestContextGetterFunction( - URLRequestContextGetterFunction* function) +void AndroidURLRequestContextGetter::SetURLRequestContext(URLRequestContext* context) { - context_getter_function_ = function; + context_ = context; } diff --git a/android/autofill/android_url_request_context_getter.h b/android/autofill/android_url_request_context_getter.h index 116323d..81b2f56 100644 --- a/android/autofill/android_url_request_context_getter.h +++ b/android/autofill/android_url_request_context_getter.h @@ -34,7 +34,7 @@ class AndroidURLRequestContextGetter : public URLRequestContextGetter { public: AndroidURLRequestContextGetter() - : context_getter_function_(0), io_thread_(0) { }; + : context_(0), io_thread_(0) { }; virtual ~AndroidURLRequestContextGetter() { } @@ -44,14 +44,12 @@ public: static AndroidURLRequestContextGetter* Get(); - typedef URLRequestContext* (URLRequestContextGetterFunction)(); - void SetURLRequestContextGetterFunction( - URLRequestContextGetterFunction* function); + void SetURLRequestContext(URLRequestContext*); void SetIOThread(base::Thread* io_thread) { io_thread_ = io_thread; } private: static scoped_refptr<AndroidURLRequestContextGetter> instance_; - URLRequestContextGetterFunction* context_getter_function_; + URLRequestContext* context_; mutable base::Thread* io_thread_; }; |