| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <set> | 5 #include <set> |
| 6 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 last_modified_ = other->last_modified_; | 77 last_modified_ = other->last_modified_; |
| 78 } | 78 } |
| 79 multibuffer()->MergeFrom(other->multibuffer()); | 79 multibuffer()->MergeFrom(other->multibuffer()); |
| 80 } | 80 } |
| 81 | 81 |
| 82 void UrlData::set_cacheable(bool cacheable) { | 82 void UrlData::set_cacheable(bool cacheable) { |
| 83 DCHECK(thread_checker_.CalledOnValidThread()); | 83 DCHECK(thread_checker_.CalledOnValidThread()); |
| 84 cacheable_ = cacheable; | 84 cacheable_ = cacheable; |
| 85 } | 85 } |
| 86 | 86 |
| 87 void UrlData::set_length(int64 length) { | 87 void UrlData::set_length(int64_t length) { |
| 88 DCHECK(thread_checker_.CalledOnValidThread()); | 88 DCHECK(thread_checker_.CalledOnValidThread()); |
| 89 if (length != kPositionNotSpecified) { | 89 if (length != kPositionNotSpecified) { |
| 90 length_ = length; | 90 length_ = length; |
| 91 } | 91 } |
| 92 } | 92 } |
| 93 | 93 |
| 94 void UrlData::RedirectTo(const scoped_refptr<UrlData>& url_data) { | 94 void UrlData::RedirectTo(const scoped_refptr<UrlData>& url_data) { |
| 95 DCHECK(thread_checker_.CalledOnValidThread()); | 95 DCHECK(thread_checker_.CalledOnValidThread()); |
| 96 // Copy any cached data over to the new location. | 96 // Copy any cached data over to the new location. |
| 97 url_data->multibuffer()->MergeFrom(multibuffer()); | 97 url_data->multibuffer()->MergeFrom(multibuffer()); |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 url_data->CachedSize() > (*by_url_slot)->CachedSize())) { | 228 url_data->CachedSize() > (*by_url_slot)->CachedSize())) { |
| 229 *by_url_slot = url_data; | 229 *by_url_slot = url_data; |
| 230 } else { | 230 } else { |
| 231 (*by_url_slot)->MergeFrom(url_data); | 231 (*by_url_slot)->MergeFrom(url_data); |
| 232 } | 232 } |
| 233 } | 233 } |
| 234 return *by_url_slot; | 234 return *by_url_slot; |
| 235 } | 235 } |
| 236 | 236 |
| 237 } // namespace media | 237 } // namespace media |
| OLD | NEW |