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

Side by Side Diff: chrome/browser/prerender/prerender_contents.cc

Issue 2711693002: [Offline Pages] Make prerenderer notify us of network progress. (Closed)
Patch Set: Created 3 years, 10 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
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 "chrome/browser/prerender/prerender_contents.h" 5 #include "chrome/browser/prerender/prerender_contents.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <functional> 10 #include <functional>
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 prerender_canceler_binding_.Bind(std::move(request)); 771 prerender_canceler_binding_.Bind(std::move(request));
772 } 772 }
773 773
774 void PrerenderContents::AddResourceThrottle( 774 void PrerenderContents::AddResourceThrottle(
775 const base::WeakPtr<PrerenderResourceThrottle>& throttle) { 775 const base::WeakPtr<PrerenderResourceThrottle>& throttle) {
776 resource_throttles_.push_back(throttle); 776 resource_throttles_.push_back(throttle);
777 } 777 }
778 778
779 void PrerenderContents::AddNetworkBytes(int64_t bytes) { 779 void PrerenderContents::AddNetworkBytes(int64_t bytes) {
780 network_bytes_ += bytes; 780 network_bytes_ += bytes;
781 for (Observer& observer : observer_list_)
pasko-google - do not use 2017/02/22 13:32:44 nit: auto&?
Pete Williamson 2017/02/22 18:46:30 I think this is better as Observer&, auto is helpf
Dmitry Titov 2017/02/23 04:27:54 Oh, opposite guidance! :) I've looked through this
pasko 2017/02/24 15:10:28 sgtm
782 observer.OnPrerenderNetworkBytesChanged(this);
781 } 783 }
782 784
783 } // namespace prerender 785 } // namespace prerender
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698