| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/callback.h" | 6 #include "base/callback.h" |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "content/browser/fileapi/chrome_blob_storage_context.h" | 10 #include "content/browser/fileapi/chrome_blob_storage_context.h" |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 LongLivedResourceInterceptor(const std::string& body) | 185 LongLivedResourceInterceptor(const std::string& body) |
| 186 : body_(body) {} | 186 : body_(body) {} |
| 187 virtual ~LongLivedResourceInterceptor() {} | 187 virtual ~LongLivedResourceInterceptor() {} |
| 188 | 188 |
| 189 // net::URLRequestInterceptor implementation | 189 // net::URLRequestInterceptor implementation |
| 190 virtual net::URLRequestJob* MaybeInterceptRequest( | 190 virtual net::URLRequestJob* MaybeInterceptRequest( |
| 191 net::URLRequest* request, | 191 net::URLRequest* request, |
| 192 net::NetworkDelegate* network_delegate) const OVERRIDE { | 192 net::NetworkDelegate* network_delegate) const OVERRIDE { |
| 193 const char kHeaders[] = | 193 const char kHeaders[] = |
| 194 "HTTP/1.1 200 OK\0" | 194 "HTTP/1.1 200 OK\0" |
| 195 "Content-Type: text/javascript\0" |
| 195 "Expires: Thu, 1 Jan 2100 20:00:00 GMT\0" | 196 "Expires: Thu, 1 Jan 2100 20:00:00 GMT\0" |
| 196 "\0"; | 197 "\0"; |
| 197 std::string headers(kHeaders, arraysize(kHeaders)); | 198 std::string headers(kHeaders, arraysize(kHeaders)); |
| 198 return new net::URLRequestTestJob( | 199 return new net::URLRequestTestJob( |
| 199 request, network_delegate, headers, body_, true); | 200 request, network_delegate, headers, body_, true); |
| 200 } | 201 } |
| 201 | 202 |
| 202 private: | 203 private: |
| 203 std::string body_; | 204 std::string body_; |
| 204 DISALLOW_COPY_AND_ASSIGN(LongLivedResourceInterceptor); | 205 DISALLOW_COPY_AND_ASSIGN(LongLivedResourceInterceptor); |
| (...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 933 base::Bind(&ServiceWorkerBlackBoxBrowserTest::FindRegistrationOnIO, | 934 base::Bind(&ServiceWorkerBlackBoxBrowserTest::FindRegistrationOnIO, |
| 934 this, | 935 this, |
| 935 embedded_test_server()->GetURL("/service_worker/empty.html"), | 936 embedded_test_server()->GetURL("/service_worker/empty.html"), |
| 936 &status, | 937 &status, |
| 937 &script_url)); | 938 &script_url)); |
| 938 EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, status); | 939 EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, status); |
| 939 } | 940 } |
| 940 } | 941 } |
| 941 | 942 |
| 942 } // namespace content | 943 } // namespace content |
| OLD | NEW |