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

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

Issue 19054012: Reload Local NTP on default search provider change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 7 years, 5 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/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, 70 registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
71 content::Source<ThemeService>( 71 content::Source<ThemeService>(
72 ThemeServiceFactory::GetForProfile(profile_))); 72 ThemeServiceFactory::GetForProfile(profile_)));
73 73
74 content::URLDataSource::Add(profile, new ThemeSource(profile)); 74 content::URLDataSource::Add(profile, new ThemeSource(profile));
75 #endif // defined(ENABLE_THEMES) 75 #endif // defined(ENABLE_THEMES)
76 76
77 content::URLDataSource::Add(profile, new ThumbnailSource(profile)); 77 content::URLDataSource::Add(profile, new ThumbnailSource(profile));
78 content::URLDataSource::Add(profile, new FaviconSource( 78 content::URLDataSource::Add(profile, new FaviconSource(
79 profile, FaviconSource::FAVICON)); 79 profile, FaviconSource::FAVICON));
80 content::URLDataSource::Add(profile, new LocalNtpSource()); 80 content::URLDataSource::Add(profile, new LocalNtpSource(profile));
81 content::URLDataSource::Add(profile, new MostVisitedIframeSource()); 81 content::URLDataSource::Add(profile, new MostVisitedIframeSource());
82 } 82 }
83 83
84 InstantService::~InstantService() { 84 InstantService::~InstantService() {
85 } 85 }
86 86
87 void InstantService::AddInstantProcess(int process_id) { 87 void InstantService::AddInstantProcess(int process_id) {
88 process_ids_.insert(process_id); 88 process_ids_.insert(process_id);
89 89
90 if (instant_io_context_.get()) { 90 if (instant_io_context_.get()) {
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 DCHECK(image); 290 DCHECK(image);
291 theme_info_->image_height = image->height(); 291 theme_info_->image_height = image->height();
292 292
293 theme_info_->has_attribution = 293 theme_info_->has_attribution =
294 theme_service->HasCustomImage(IDR_THEME_NTP_ATTRIBUTION); 294 theme_service->HasCustomImage(IDR_THEME_NTP_ATTRIBUTION);
295 } 295 }
296 296
297 FOR_EACH_OBSERVER(InstantServiceObserver, observers_, 297 FOR_EACH_OBSERVER(InstantServiceObserver, observers_,
298 ThemeInfoChanged(*theme_info_)); 298 ThemeInfoChanged(*theme_info_));
299 } 299 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698