Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
| 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) | 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) |
| 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
| 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All | 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 7 rights reserved. | 7 rights reserved. |
| 8 | 8 |
| 9 This library is free software; you can redistribute it and/or | 9 This library is free software; you can redistribute it and/or |
| 10 modify it under the terms of the GNU Library General Public | 10 modify it under the terms of the GNU Library General Public |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 262 type_(type), | 262 type_(type), |
| 263 status_(ResourceStatus::kNotStarted), | 263 status_(ResourceStatus::kNotStarted), |
| 264 needs_synchronous_cache_hit_(false), | 264 needs_synchronous_cache_hit_(false), |
| 265 link_preload_(false), | 265 link_preload_(false), |
| 266 is_revalidating_(false), | 266 is_revalidating_(false), |
| 267 is_alive_(false), | 267 is_alive_(false), |
| 268 is_add_remove_client_prohibited_(false), | 268 is_add_remove_client_prohibited_(false), |
| 269 integrity_disposition_(ResourceIntegrityDisposition::kNotChecked), | 269 integrity_disposition_(ResourceIntegrityDisposition::kNotChecked), |
| 270 options_(options), | 270 options_(options), |
| 271 response_timestamp_(CurrentTime()), | 271 response_timestamp_(CurrentTime()), |
| 272 cancel_timer_(IsMainThread() | 272 cancel_timer_(IsMainThread() ? Platform::Current() |
|
kinuko
2017/05/15 06:24:48
Can you add a short comment like: 'we use MainThre
horo
2017/05/15 06:38:41
Done.
| |
| 273 ? Platform::Current()->MainThread()->GetWebTaskRunner() | 273 ->MainThread() |
| 274 : Platform::Current() | 274 ->Scheduler() |
| 275 ->CurrentThread() | 275 ->LoadingTaskRunner() |
| 276 ->Scheduler() | 276 : Platform::Current() |
| 277 ->LoadingTaskRunner(), | 277 ->CurrentThread() |
| 278 ->Scheduler() | |
| 279 ->LoadingTaskRunner(), | |
| 278 this, | 280 this, |
| 279 &Resource::CancelTimerFired), | 281 &Resource::CancelTimerFired), |
| 280 resource_request_(request) { | 282 resource_request_(request) { |
| 281 InstanceCounters::IncrementCounter(InstanceCounters::kResourceCounter); | 283 InstanceCounters::IncrementCounter(InstanceCounters::kResourceCounter); |
| 282 | 284 |
| 283 // Currently we support the metadata caching only for HTTP family. | 285 // Currently we support the metadata caching only for HTTP family. |
| 284 if (GetResourceRequest().Url().ProtocolIsInHTTPFamily()) | 286 if (GetResourceRequest().Url().ProtocolIsInHTTPFamily()) |
| 285 cache_handler_ = CachedMetadataHandlerImpl::Create(this); | 287 cache_handler_ = CachedMetadataHandlerImpl::Create(this); |
| 286 if (IsMainThread()) | 288 if (IsMainThread()) |
| 287 MemoryCoordinator::Instance().RegisterClient(this); | 289 MemoryCoordinator::Instance().RegisterClient(this); |
| (...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1079 case Resource::kMedia: | 1081 case Resource::kMedia: |
| 1080 case Resource::kManifest: | 1082 case Resource::kManifest: |
| 1081 case Resource::kMock: | 1083 case Resource::kMock: |
| 1082 return false; | 1084 return false; |
| 1083 } | 1085 } |
| 1084 NOTREACHED(); | 1086 NOTREACHED(); |
| 1085 return false; | 1087 return false; |
| 1086 } | 1088 } |
| 1087 | 1089 |
| 1088 } // namespace blink | 1090 } // namespace blink |
| OLD | NEW |