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

Side by Side Diff: chrome/browser/search/instant_service.cc

Issue 2790463003: ntp_tiles: Cleanup enum names (Closed)
Patch Set: add back histogram enums Created 3 years, 8 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 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 #include "chrome/browser/search/instant_service.h" 5 #include "chrome/browser/search/instant_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 } 286 }
287 } 287 }
288 288
289 void InstantService::OnTopSitesReceived( 289 void InstantService::OnTopSitesReceived(
290 const history::MostVisitedURLList& data) { 290 const history::MostVisitedURLList& data) {
291 most_visited_items_.clear(); 291 most_visited_items_.clear();
292 for (const history::MostVisitedURL& mv_url : data) { 292 for (const history::MostVisitedURL& mv_url : data) {
293 InstantMostVisitedItem item; 293 InstantMostVisitedItem item;
294 item.url = mv_url.url; 294 item.url = mv_url.url;
295 item.title = mv_url.title; 295 item.title = mv_url.title;
296 item.source = ntp_tiles::NTPTileSource::TOP_SITES; 296 item.source = ntp_tiles::TileSource::TOP_SITES;
297 most_visited_items_.push_back(item); 297 most_visited_items_.push_back(item);
298 } 298 }
299 299
300 NotifyAboutMostVisitedItems(); 300 NotifyAboutMostVisitedItems();
301 } 301 }
302 302
303 void InstantService::OnMostVisitedURLsAvailable( 303 void InstantService::OnMostVisitedURLsAvailable(
304 const ntp_tiles::NTPTilesVector& tiles) { 304 const ntp_tiles::NTPTilesVector& tiles) {
305 DCHECK(most_visited_sites_); 305 DCHECK(most_visited_sites_);
306 most_visited_items_.clear(); 306 most_visited_items_.clear();
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 void InstantService::ResetInstantSearchPrerendererIfNecessary() { 475 void InstantService::ResetInstantSearchPrerendererIfNecessary() {
476 if (!search::IsInstantExtendedAPIEnabled()) 476 if (!search::IsInstantExtendedAPIEnabled())
477 return; 477 return;
478 478
479 GURL url(search::GetSearchResultPrefetchBaseURL(profile_)); 479 GURL url(search::GetSearchResultPrefetchBaseURL(profile_));
480 if (!instant_prerenderer_ || instant_prerenderer_->prerender_url() != url) { 480 if (!instant_prerenderer_ || instant_prerenderer_->prerender_url() != url) {
481 instant_prerenderer_.reset( 481 instant_prerenderer_.reset(
482 url.is_valid() ? new InstantSearchPrerenderer(profile_, url) : nullptr); 482 url.is_valid() ? new InstantSearchPrerenderer(profile_, url) : nullptr);
483 } 483 }
484 } 484 }
OLDNEW
« no previous file with comments | « chrome/browser/android/ntp/most_visited_sites_bridge.cc ('k') | chrome/browser/search/instant_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698