| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "net/url_request/sdch_dictionary_fetcher.h" | 5 #include "net/url_request/sdch_dictionary_fetcher.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 } | 276 } |
| 277 | 277 |
| 278 next_state_ = STATE_SEND_REQUEST_PENDING; | 278 next_state_ = STATE_SEND_REQUEST_PENDING; |
| 279 | 279 |
| 280 FetchInfo info; | 280 FetchInfo info; |
| 281 bool success = fetch_queue_->Pop(&info); | 281 bool success = fetch_queue_->Pop(&info); |
| 282 DCHECK(success); | 282 DCHECK(success); |
| 283 current_request_ = context_->CreateRequest(info.url, IDLE, this); | 283 current_request_ = context_->CreateRequest(info.url, IDLE, this); |
| 284 int load_flags = LOAD_DO_NOT_SEND_COOKIES | LOAD_DO_NOT_SAVE_COOKIES; | 284 int load_flags = LOAD_DO_NOT_SEND_COOKIES | LOAD_DO_NOT_SAVE_COOKIES; |
| 285 if (info.cache_only) | 285 if (info.cache_only) |
| 286 load_flags |= LOAD_ONLY_FROM_CACHE; | 286 load_flags |= LOAD_ONLY_FROM_CACHE | LOAD_SKIP_CACHE_VALIDATION; |
| 287 current_request_->SetLoadFlags(load_flags); | 287 current_request_->SetLoadFlags(load_flags); |
| 288 | 288 |
| 289 buffer_ = new IOBuffer(kBufferSize); | 289 buffer_ = new IOBuffer(kBufferSize); |
| 290 dictionary_.reset(new std::string()); | 290 dictionary_.reset(new std::string()); |
| 291 current_callback_ = info.callback; | 291 current_callback_ = info.callback; |
| 292 | 292 |
| 293 current_request_->Start(); | 293 current_request_->Start(); |
| 294 current_request_->net_log().AddEvent(NetLogEventType::SDCH_DICTIONARY_FETCH); | 294 current_request_->net_log().AddEvent(NetLogEventType::SDCH_DICTIONARY_FETCH); |
| 295 | 295 |
| 296 return ERR_IO_PENDING; | 296 return ERR_IO_PENDING; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 current_request_->net_log(), | 370 current_request_->net_log(), |
| 371 current_request_->was_cached()); | 371 current_request_->was_cached()); |
| 372 } | 372 } |
| 373 | 373 |
| 374 ResetRequest(); | 374 ResetRequest(); |
| 375 next_state_ = STATE_SEND_REQUEST; | 375 next_state_ = STATE_SEND_REQUEST; |
| 376 return OK; | 376 return OK; |
| 377 } | 377 } |
| 378 | 378 |
| 379 } // namespace net | 379 } // namespace net |
| OLD | NEW |