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

Side by Side Diff: mojo/services/network/url_loader_impl.cc

Issue 1378953003: Fix handling of URLRequest::CACHE_MODE_BYPASS_CACHE (Closed) Base URL: https://github.com/domokit/monet.git@master
Patch Set: Created 5 years, 2 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "mojo/services/network/url_loader_impl.h" 5 #include "mojo/services/network/url_loader_impl.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 } 569 }
570 url_request_->set_upload(make_scoped_ptr<net::UploadDataStream>( 570 url_request_->set_upload(make_scoped_ptr<net::UploadDataStream>(
571 new net::ElementsUploadDataStream(element_readers.Pass(), 0))); 571 new net::ElementsUploadDataStream(element_readers.Pass(), 0)));
572 } 572 }
573 int load_flags = 0; 573 int load_flags = 0;
574 switch (request->cache_mode) { 574 switch (request->cache_mode) {
575 case URLRequest::CACHE_MODE_DEFAULT: 575 case URLRequest::CACHE_MODE_DEFAULT:
576 break; 576 break;
577 case URLRequest::CACHE_MODE_BYPASS_CACHE: 577 case URLRequest::CACHE_MODE_BYPASS_CACHE:
578 load_flags |= net::LOAD_BYPASS_CACHE; 578 load_flags |= net::LOAD_BYPASS_CACHE;
579 break;
579 case URLRequest::CACHE_MODE_ONLY_FROM_CACHE: 580 case URLRequest::CACHE_MODE_ONLY_FROM_CACHE:
580 load_flags |= net::LOAD_ONLY_FROM_CACHE; 581 load_flags |= net::LOAD_ONLY_FROM_CACHE;
581 break; 582 break;
582 } 583 }
583 if (load_flags) 584 if (load_flags)
584 url_request_->SetLoadFlags(load_flags); 585 url_request_->SetLoadFlags(load_flags);
585 586
586 response_body_buffer_size_ = request->response_body_buffer_size; 587 response_body_buffer_size_ = request->response_body_buffer_size;
587 auto_follow_redirects_ = request->auto_follow_redirects; 588 auto_follow_redirects_ = request->auto_follow_redirects;
588 589
(...skipping 26 matching lines...) Expand all
615 if ((*it)->id() == current_fetcher_id_) { 616 if ((*it)->id() == current_fetcher_id_) {
616 last_status_ = fetcher->QueryStatus(); 617 last_status_ = fetcher->QueryStatus();
617 last_status_->is_loading = false; 618 last_status_->is_loading = false;
618 } 619 }
619 body_fetchers_.erase(it); 620 body_fetchers_.erase(it);
620 if (body_fetchers_.empty() and !binding_.is_bound()) 621 if (body_fetchers_.empty() and !binding_.is_bound())
621 delete this; 622 delete this;
622 } 623 }
623 624
624 } // namespace mojo 625 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698