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

Side by Side Diff: content/browser/loader/resource_scheduler_unittest.cc

Issue 143003031: Allow retrieval of media device ID salt even after ResourceContext has gone away. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add TODO about proper fix. Created 6 years, 10 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/browser/loader/resource_scheduler.h" 5 #include "content/browser/loader/resource_scheduler.h"
6 6
7 #include "base/memory/scoped_vector.h" 7 #include "base/memory/scoped_vector.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "content/browser/browser_thread_impl.h" 10 #include "content/browser/browser_thread_impl.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 scoped_ptr<TestRequest> request_to_cancel_; 86 scoped_ptr<TestRequest> request_to_cancel_;
87 }; 87 };
88 88
89 class FakeResourceContext : public ResourceContext { 89 class FakeResourceContext : public ResourceContext {
90 private: 90 private:
91 virtual net::HostResolver* GetHostResolver() OVERRIDE { return NULL; } 91 virtual net::HostResolver* GetHostResolver() OVERRIDE { return NULL; }
92 virtual net::URLRequestContext* GetRequestContext() OVERRIDE { return NULL; } 92 virtual net::URLRequestContext* GetRequestContext() OVERRIDE { return NULL; }
93 virtual bool AllowMicAccess(const GURL& origin) OVERRIDE { return false; } 93 virtual bool AllowMicAccess(const GURL& origin) OVERRIDE { return false; }
94 virtual bool AllowCameraAccess(const GURL& origin) OVERRIDE { return false; } 94 virtual bool AllowCameraAccess(const GURL& origin) OVERRIDE { return false; }
95 virtual std::string GetMediaDeviceIDSalt() OVERRIDE { return std::string(); }
96 }; 95 };
97 96
98 class FakeResourceMessageFilter : public ResourceMessageFilter { 97 class FakeResourceMessageFilter : public ResourceMessageFilter {
99 public: 98 public:
100 FakeResourceMessageFilter(int child_id) 99 FakeResourceMessageFilter(int child_id)
101 : ResourceMessageFilter( 100 : ResourceMessageFilter(
102 child_id, 101 child_id,
103 PROCESS_TYPE_RENDERER, 102 PROCESS_TYPE_RENDERER,
104 NULL /* appcache_service */, 103 NULL /* appcache_service */,
105 NULL /* blob_storage_context */, 104 NULL /* blob_storage_context */,
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 scheduler_.OnReceivedSpdyProxiedHttpResponse(kChildId, kRouteId); 474 scheduler_.OnReceivedSpdyProxiedHttpResponse(kChildId, kRouteId);
476 EXPECT_TRUE(request->started()); 475 EXPECT_TRUE(request->started());
477 476
478 scoped_ptr<TestRequest> after(NewRequest("http://host/after", net::IDLE)); 477 scoped_ptr<TestRequest> after(NewRequest("http://host/after", net::IDLE));
479 EXPECT_TRUE(after->started()); 478 EXPECT_TRUE(after->started());
480 } 479 }
481 480
482 } // unnamed namespace 481 } // unnamed namespace
483 482
484 } // namespace content 483 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_io_data.cc ('k') | content/browser/renderer_host/media/device_request_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698