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

Side by Side Diff: components/ntp_tiles/most_visited_sites.h

Issue 2577253003: ntp_tiles: Avoid redundant calls to TopSites (Closed)
Patch Set: Renamed weak ptr factory. Created 3 years, 11 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 | components/ntp_tiles/most_visited_sites.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef COMPONENTS_NTP_TILES_MOST_VISITED_SITES_H_ 5 #ifndef COMPONENTS_NTP_TILES_MOST_VISITED_SITES_H_
6 #define COMPONENTS_NTP_TILES_MOST_VISITED_SITES_H_ 6 #define COMPONENTS_NTP_TILES_MOST_VISITED_SITES_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 suggestions_subscription_; 186 suggestions_subscription_;
187 187
188 ScopedObserver<history::TopSites, history::TopSitesObserver> 188 ScopedObserver<history::TopSites, history::TopSitesObserver>
189 top_sites_observer_; 189 top_sites_observer_;
190 190
191 // The main source of personal tiles - either TOP_SITES or SUGGESTIONS_SEVICE. 191 // The main source of personal tiles - either TOP_SITES or SUGGESTIONS_SEVICE.
192 NTPTileSource mv_source_; 192 NTPTileSource mv_source_;
193 193
194 NTPTilesVector current_tiles_; 194 NTPTilesVector current_tiles_;
195 195
196 // For callbacks may be run after destruction. 196 // For callbacks may be run after destruction, used exclusively for TopSites
197 base::WeakPtrFactory<MostVisitedSites> weak_ptr_factory_; 197 // (since it's used to detect whether there's a query in flight).
198 base::WeakPtrFactory<MostVisitedSites> top_sites_weak_ptr_factory_;
198 199
199 DISALLOW_COPY_AND_ASSIGN(MostVisitedSites); 200 DISALLOW_COPY_AND_ASSIGN(MostVisitedSites);
200 }; 201 };
201 202
202 } // namespace ntp_tiles 203 } // namespace ntp_tiles
203 204
204 #endif // COMPONENTS_NTP_TILES_MOST_VISITED_SITES_H_ 205 #endif // COMPONENTS_NTP_TILES_MOST_VISITED_SITES_H_
OLDNEW
« no previous file with comments | « no previous file | components/ntp_tiles/most_visited_sites.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698