| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/message_loop.h" | 5 #include "base/message_loop.h" |
| 6 #include "base/process_util.h" | 6 #include "base/process_util.h" |
| 7 #include "media/base/filter_host.h" | 7 #include "media/base/filter_host.h" |
| 8 #include "net/base/load_flags.h" | 8 #include "net/base/load_flags.h" |
| 9 #include "net/base/data_url.h" | 9 #include "net/base/data_url.h" |
| 10 #include "net/http/http_response_headers.h" | 10 #include "net/http/http_response_headers.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 return false; | 116 return false; |
| 117 } | 117 } |
| 118 | 118 |
| 119 void SimpleDataSource::OnDownloadProgress(uint64 position, uint64 size) {} | 119 void SimpleDataSource::OnDownloadProgress(uint64 position, uint64 size) {} |
| 120 | 120 |
| 121 void SimpleDataSource::OnUploadProgress(uint64 position, uint64 size) {} | 121 void SimpleDataSource::OnUploadProgress(uint64 position, uint64 size) {} |
| 122 | 122 |
| 123 bool SimpleDataSource::OnReceivedRedirect( | 123 bool SimpleDataSource::OnReceivedRedirect( |
| 124 const GURL& new_url, | 124 const GURL& new_url, |
| 125 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info, | 125 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info, |
| 126 bool* has_new_first_party_for_cookies, |
| 126 GURL* new_first_party_for_cookies) { | 127 GURL* new_first_party_for_cookies) { |
| 127 SetURL(new_url); | 128 SetURL(new_url); |
| 128 *new_first_party_for_cookies = GURL(); | 129 // TODO(wtc): should we return a new first party for cookies URL? |
| 130 *has_new_first_party_for_cookies = false; |
| 129 return true; | 131 return true; |
| 130 } | 132 } |
| 131 | 133 |
| 132 void SimpleDataSource::OnReceivedResponse( | 134 void SimpleDataSource::OnReceivedResponse( |
| 133 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info, | 135 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info, |
| 134 bool content_filtered) { | 136 bool content_filtered) { |
| 135 size_ = info.content_length; | 137 size_ = info.content_length; |
| 136 } | 138 } |
| 137 | 139 |
| 138 void SimpleDataSource::OnReceivedData(const char* data, int len) { | 140 void SimpleDataSource::OnReceivedData(const char* data, int len) { |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 // If scheme is file or data, say we are loaded. | 223 // If scheme is file or data, say we are loaded. |
| 222 host()->SetLoaded(url_.SchemeIsFile() || IsDataProtocol(url_)); | 224 host()->SetLoaded(url_.SchemeIsFile() || IsDataProtocol(url_)); |
| 223 } else { | 225 } else { |
| 224 host()->SetError(media::PIPELINE_ERROR_NETWORK); | 226 host()->SetError(media::PIPELINE_ERROR_NETWORK); |
| 225 } | 227 } |
| 226 initialize_callback_->Run(); | 228 initialize_callback_->Run(); |
| 227 initialize_callback_.reset(); | 229 initialize_callback_.reset(); |
| 228 } | 230 } |
| 229 | 231 |
| 230 } // namespace webkit_glue | 232 } // namespace webkit_glue |
| OLD | NEW |