Chromium Code Reviews| 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 "webkit/appcache/appcache_update_job.h" | 5 #include "webkit/appcache/appcache_update_job.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 98 buffer_(new net::IOBuffer(kBufferSize)), | 98 buffer_(new net::IOBuffer(kBufferSize)), |
| 99 ALLOW_THIS_IN_INITIALIZER_LIST( | 99 ALLOW_THIS_IN_INITIALIZER_LIST( |
| 100 request_(new net::URLRequest(url, this))) { | 100 request_(new net::URLRequest(url, this))) { |
| 101 } | 101 } |
| 102 | 102 |
| 103 AppCacheUpdateJob::URLFetcher::~URLFetcher() { | 103 AppCacheUpdateJob::URLFetcher::~URLFetcher() { |
| 104 } | 104 } |
| 105 | 105 |
| 106 void AppCacheUpdateJob::URLFetcher::Start() { | 106 void AppCacheUpdateJob::URLFetcher::Start() { |
| 107 request_->set_context(job_->service_->request_context()); | 107 request_->set_context(job_->service_->request_context()); |
| 108 request_->set_first_party_for_cookies(job_->manifest_url_); | |
|
michaeln
2012/03/08 20:12:58
thnx!
| |
| 108 request_->set_load_flags(request_->load_flags() | | 109 request_->set_load_flags(request_->load_flags() | |
| 109 net::LOAD_DISABLE_INTERCEPT); | 110 net::LOAD_DISABLE_INTERCEPT); |
| 110 if (existing_response_headers_) | 111 if (existing_response_headers_) |
| 111 AddConditionalHeaders(existing_response_headers_); | 112 AddConditionalHeaders(existing_response_headers_); |
| 112 request_->Start(); | 113 request_->Start(); |
| 113 } | 114 } |
| 114 | 115 |
| 115 void AppCacheUpdateJob::URLFetcher::OnReceivedRedirect( | 116 void AppCacheUpdateJob::URLFetcher::OnReceivedRedirect( |
| 116 net::URLRequest* request, const GURL& new_url, bool* defer_redirect) { | 117 net::URLRequest* request, const GURL& new_url, bool* defer_redirect) { |
| 117 DCHECK(request_ == request); | 118 DCHECK(request_ == request); |
| (...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1327 | 1328 |
| 1328 // Break the connection with the group so the group cannot call delete | 1329 // Break the connection with the group so the group cannot call delete |
| 1329 // on this object after we've posted a task to delete ourselves. | 1330 // on this object after we've posted a task to delete ourselves. |
| 1330 group_->SetUpdateStatus(AppCacheGroup::IDLE); | 1331 group_->SetUpdateStatus(AppCacheGroup::IDLE); |
| 1331 group_ = NULL; | 1332 group_ = NULL; |
| 1332 | 1333 |
| 1333 MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 1334 MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
| 1334 } | 1335 } |
| 1335 | 1336 |
| 1336 } // namespace appcache | 1337 } // namespace appcache |
| OLD | NEW |