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

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

Issue 256763004: Remove WebUI NTP on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ted's nit Created 6 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 | Annotate | Revision Log
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 <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // Set up the data sources that Instant uses on the NTP. 102 // Set up the data sources that Instant uses on the NTP.
103 #if defined(ENABLE_THEMES) 103 #if defined(ENABLE_THEMES)
104 // Listen for theme installation. 104 // Listen for theme installation.
105 registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, 105 registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
106 content::Source<ThemeService>( 106 content::Source<ThemeService>(
107 ThemeServiceFactory::GetForProfile(profile_))); 107 ThemeServiceFactory::GetForProfile(profile_)));
108 108
109 content::URLDataSource::Add(profile_, new ThemeSource(profile_)); 109 content::URLDataSource::Add(profile_, new ThemeSource(profile_));
110 #endif // defined(ENABLE_THEMES) 110 #endif // defined(ENABLE_THEMES)
111 111
112 #if !defined(OS_ANDROID)
Nico 2014/04/25 20:22:04 This change isn't obvious to me. Maybe "// Thumbna
aurimas (slooooooooow) 2014/04/25 21:23:38 We don't use instant_service.cc at on Android, but
112 content::URLDataSource::Add(profile_, new ThumbnailSource(profile_, false)); 113 content::URLDataSource::Add(profile_, new ThumbnailSource(profile_, false));
113 content::URLDataSource::Add(profile_, new ThumbnailSource(profile_, true)); 114 content::URLDataSource::Add(profile_, new ThumbnailSource(profile_, true));
114 content::URLDataSource::Add(profile_, new ThumbnailListSource(profile_)); 115 content::URLDataSource::Add(profile_, new ThumbnailListSource(profile_));
116 #endif // !defined(OS_ANDROID)
117
115 content::URLDataSource::Add( 118 content::URLDataSource::Add(
116 profile_, new FaviconSource(profile_, FaviconSource::FAVICON)); 119 profile_, new FaviconSource(profile_, FaviconSource::FAVICON));
117 content::URLDataSource::Add(profile_, new LocalNtpSource(profile_)); 120 content::URLDataSource::Add(profile_, new LocalNtpSource(profile_));
118 content::URLDataSource::Add(profile_, new MostVisitedIframeSource()); 121 content::URLDataSource::Add(profile_, new MostVisitedIframeSource());
119 if (suggestions::SuggestionsService::IsEnabled()) { 122 if (suggestions::SuggestionsService::IsEnabled()) {
120 content::URLDataSource::Add( 123 content::URLDataSource::Add(
121 profile_, new suggestions::SuggestionsSource(profile_)); 124 profile_, new suggestions::SuggestionsSource(profile_));
122 } 125 }
123 126
124 profile_pref_registrar_.Init(profile_->GetPrefs()); 127 profile_pref_registrar_.Init(profile_->GetPrefs());
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 void InstantService::ResetInstantSearchPrerenderer() { 450 void InstantService::ResetInstantSearchPrerenderer() {
448 if (!chrome::ShouldPrefetchSearchResults()) 451 if (!chrome::ShouldPrefetchSearchResults())
449 return; 452 return;
450 453
451 GURL url(chrome::GetSearchResultPrefetchBaseURL(profile_)); 454 GURL url(chrome::GetSearchResultPrefetchBaseURL(profile_));
452 if (url.is_valid()) 455 if (url.is_valid())
453 instant_prerenderer_.reset(new InstantSearchPrerenderer(profile_, url)); 456 instant_prerenderer_.reset(new InstantSearchPrerenderer(profile_, url));
454 else 457 else
455 instant_prerenderer_.reset(); 458 instant_prerenderer_.reset();
456 } 459 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698