OLD | NEW |
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 Loading... |
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 void SetNetworkState( |
| 96 const std::string& client_id, |
| 97 bool offline) OVERRIDE {}; |
95 }; | 98 }; |
96 | 99 |
97 class FakeResourceMessageFilter : public ResourceMessageFilter { | 100 class FakeResourceMessageFilter : public ResourceMessageFilter { |
98 public: | 101 public: |
99 FakeResourceMessageFilter(int child_id) | 102 FakeResourceMessageFilter(int child_id) |
100 : ResourceMessageFilter( | 103 : ResourceMessageFilter( |
101 child_id, | 104 child_id, |
102 PROCESS_TYPE_RENDERER, | 105 PROCESS_TYPE_RENDERER, |
103 NULL /* appcache_service */, | 106 NULL /* appcache_service */, |
104 NULL /* blob_storage_context */, | 107 NULL /* blob_storage_context */, |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 http_server_properties_.SetSupportsSpdy( | 532 http_server_properties_.SetSupportsSpdy( |
530 net::HostPortPair("spdyhost2", 8080), true); | 533 net::HostPortPair("spdyhost2", 8080), true); |
531 ChangeRequestPriority(low2_spdy.get(), net::LOWEST); | 534 ChangeRequestPriority(low2_spdy.get(), net::LOWEST); |
532 scoped_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST)); | 535 scoped_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST)); |
533 EXPECT_TRUE(low2->started()); | 536 EXPECT_TRUE(low2->started()); |
534 } | 537 } |
535 | 538 |
536 } // unnamed namespace | 539 } // unnamed namespace |
537 | 540 |
538 } // namespace content | 541 } // namespace content |
OLD | NEW |