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

Side by Side Diff: content/public/test/mock_resource_context.cc

Issue 384413004: Remove default key slot from KeygenHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed compilation, addressed suggestions. 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/public/test/mock_resource_context.h" 5 #include "content/public/test/mock_resource_context.h"
6 6
7 #include "base/logging.h"
7 #include "net/url_request/url_request_context.h" 8 #include "net/url_request/url_request_context.h"
8 9
9 namespace content { 10 namespace content {
10 11
11 MockResourceContext::MockResourceContext() 12 MockResourceContext::MockResourceContext()
12 : test_request_context_(NULL) { 13 : test_request_context_(NULL) {
13 } 14 }
14 15
15 MockResourceContext::MockResourceContext( 16 MockResourceContext::MockResourceContext(
16 net::URLRequestContext* test_request_context) 17 net::URLRequestContext* test_request_context)
17 : test_request_context_(test_request_context), 18 : test_request_context_(test_request_context),
18 mic_allowed_(false), 19 mic_allowed_(false),
19 camera_allowed_(false) { 20 camera_allowed_(false) {
20 } 21 }
21 22
22 MockResourceContext::~MockResourceContext() {} 23 MockResourceContext::~MockResourceContext() {}
23 24
24 net::HostResolver* MockResourceContext::GetHostResolver() { 25 net::HostResolver* MockResourceContext::GetHostResolver() {
25 return NULL; 26 return NULL;
26 } 27 }
27 28
29 void MockResourceContext::CreateKeygenHandler(
30 uint32 key_size_in_bits,
31 const std::string& challenge_string,
32 const GURL& url,
33 const base::Callback<void(scoped_ptr<net::KeygenHandler>)>& callback) {
34 NOTREACHED();
35 }
36
28 net::URLRequestContext* MockResourceContext::GetRequestContext() { 37 net::URLRequestContext* MockResourceContext::GetRequestContext() {
29 CHECK(test_request_context_); 38 CHECK(test_request_context_);
30 return test_request_context_; 39 return test_request_context_;
31 } 40 }
32 41
33 bool MockResourceContext::AllowMicAccess(const GURL& origin) { 42 bool MockResourceContext::AllowMicAccess(const GURL& origin) {
34 return mic_allowed_; 43 return mic_allowed_;
35 } 44 }
36 45
37 bool MockResourceContext::AllowCameraAccess(const GURL& origin) { 46 bool MockResourceContext::AllowCameraAccess(const GURL& origin) {
38 return camera_allowed_; 47 return camera_allowed_;
39 } 48 }
40 49
41 } // namespace content 50 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698