Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(413)

Side by Side Diff: webkit/browser/appcache/appcache_update_job.cc

Issue 51683002: [Net] Assert that URLRequests with LOAD_IGNORE_LIMITS have MAXIMUM_PRIORITY (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/browser/appcache/appcache_update_job.h" 5 #include "webkit/browser/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/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 retry_503_attempts_(0), 99 retry_503_attempts_(0),
100 buffer_(new net::IOBuffer(kBufferSize)), 100 buffer_(new net::IOBuffer(kBufferSize)),
101 request_(job->service_->request_context()->CreateRequest(url, this)) { 101 request_(job->service_->request_context()->CreateRequest(url, this)) {
102 } 102 }
103 103
104 AppCacheUpdateJob::URLFetcher::~URLFetcher() { 104 AppCacheUpdateJob::URLFetcher::~URLFetcher() {
105 } 105 }
106 106
107 void AppCacheUpdateJob::URLFetcher::Start() { 107 void AppCacheUpdateJob::URLFetcher::Start() {
108 request_->set_first_party_for_cookies(job_->manifest_url_); 108 request_->set_first_party_for_cookies(job_->manifest_url_);
109 request_->set_load_flags(request_->load_flags() | 109 request_->SetLoadFlags(request_->load_flags() |
110 net::LOAD_DISABLE_INTERCEPT); 110 net::LOAD_DISABLE_INTERCEPT);
111 if (existing_response_headers_.get()) 111 if (existing_response_headers_.get())
112 AddConditionalHeaders(existing_response_headers_.get()); 112 AddConditionalHeaders(existing_response_headers_.get());
113 request_->Start(); 113 request_->Start();
114 } 114 }
115 115
116 void AppCacheUpdateJob::URLFetcher::OnReceivedRedirect( 116 void AppCacheUpdateJob::URLFetcher::OnReceivedRedirect(
117 net::URLRequest* request, const GURL& new_url, bool* defer_redirect) { 117 net::URLRequest* request, const GURL& new_url, bool* defer_redirect) {
118 DCHECK(request_ == request); 118 DCHECK(request_ == request);
119 // Redirect is not allowed by the update process. 119 // Redirect is not allowed by the update process.
120 request->Cancel(); 120 request->Cancel();
(...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1364 1364
1365 // Break the connection with the group so the group cannot call delete 1365 // Break the connection with the group so the group cannot call delete
1366 // on this object after we've posted a task to delete ourselves. 1366 // on this object after we've posted a task to delete ourselves.
1367 group_->SetUpdateStatus(AppCacheGroup::IDLE); 1367 group_->SetUpdateStatus(AppCacheGroup::IDLE);
1368 group_ = NULL; 1368 group_ = NULL;
1369 1369
1370 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); 1370 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
1371 } 1371 }
1372 1372
1373 } // namespace appcache 1373 } // namespace appcache
OLDNEW
« net/socket/client_socket_pool_base_unittest.cc ('K') | « net/url_request/url_request_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698