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

Side by Side Diff: android_webview/browser/aw_resource_context.cc

Issue 384413004: Remove default key slot from KeygenHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing android_webview. Created 6 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "android_webview/browser/aw_resource_context.h" 5 #include "android_webview/browser/aw_resource_context.h"
6 6
7 #include "base/logging.h"
7 #include "content/public/browser/browser_thread.h" 8 #include "content/public/browser/browser_thread.h"
9 #include "net/base/keygen_handler.h"
8 #include "net/url_request/url_request_context.h" 10 #include "net/url_request/url_request_context.h"
9 #include "net/url_request/url_request_context_getter.h" 11 #include "net/url_request/url_request_context_getter.h"
10 12
11 namespace android_webview { 13 namespace android_webview {
12 14
13 AwResourceContext::AwResourceContext(net::URLRequestContextGetter* getter) 15 AwResourceContext::AwResourceContext(net::URLRequestContextGetter* getter)
14 : getter_(getter) { 16 : getter_(getter) {
15 DCHECK(getter_); 17 DCHECK(getter_);
16 } 18 }
17 19
(...skipping 23 matching lines...) Expand all
41 net::HostResolver* AwResourceContext::GetHostResolver() { 43 net::HostResolver* AwResourceContext::GetHostResolver() {
42 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); 44 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
43 return getter_->GetURLRequestContext()->host_resolver(); 45 return getter_->GetURLRequestContext()->host_resolver();
44 } 46 }
45 47
46 net::URLRequestContext* AwResourceContext::GetRequestContext() { 48 net::URLRequestContext* AwResourceContext::GetRequestContext() {
47 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); 49 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
48 return getter_->GetURLRequestContext(); 50 return getter_->GetURLRequestContext();
49 } 51 }
50 52
53 void AwResourceContext::CreateKeygenHandler(
54 uint32 key_size_in_bits,
55 const std::string& challenge_string,
56 const GURL& url,
57 const base::Callback<void(scoped_ptr<net::KeygenHandler>)>& callback) {
58 DCHECK(!callback.is_null());
59 callback.Run(make_scoped_ptr(
60 new net::KeygenHandler(key_size_in_bits, challenge_string, url)));
61 }
62
51 bool AwResourceContext::AllowMicAccess(const GURL& origin) { 63 bool AwResourceContext::AllowMicAccess(const GURL& origin) {
52 return false; 64 return false;
53 } 65 }
54 66
55 bool AwResourceContext::AllowCameraAccess(const GURL& origin) { 67 bool AwResourceContext::AllowCameraAccess(const GURL& origin) {
56 return false; 68 return false;
57 } 69 }
58 70
59 } // namespace android_webview 71 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698