OLD | NEW |
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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 break; | 244 break; |
245 case content::NOTIFICATION_RENDERER_PROCESS_TERMINATED: | 245 case content::NOTIFICATION_RENDERER_PROCESS_TERMINATED: |
246 OnRendererProcessTerminated( | 246 OnRendererProcessTerminated( |
247 content::Source<content::RenderProcessHost>(source)->GetID()); | 247 content::Source<content::RenderProcessHost>(source)->GetID()); |
248 break; | 248 break; |
249 case chrome::NOTIFICATION_TOP_SITES_CHANGED: { | 249 case chrome::NOTIFICATION_TOP_SITES_CHANGED: { |
250 history::TopSites* top_sites = profile_->GetTopSites(); | 250 history::TopSites* top_sites = profile_->GetTopSites(); |
251 if (top_sites) { | 251 if (top_sites) { |
252 top_sites->GetMostVisitedURLs( | 252 top_sites->GetMostVisitedURLs( |
253 base::Bind(&InstantService::OnMostVisitedItemsReceived, | 253 base::Bind(&InstantService::OnMostVisitedItemsReceived, |
254 weak_ptr_factory_.GetWeakPtr())); | 254 weak_ptr_factory_.GetWeakPtr()), false); |
255 } | 255 } |
256 break; | 256 break; |
257 } | 257 } |
258 #if defined(ENABLE_THEMES) | 258 #if defined(ENABLE_THEMES) |
259 case chrome::NOTIFICATION_BROWSER_THEME_CHANGED: { | 259 case chrome::NOTIFICATION_BROWSER_THEME_CHANGED: { |
260 OnThemeChanged(content::Source<ThemeService>(source).ptr()); | 260 OnThemeChanged(content::Source<ThemeService>(source).ptr()); |
261 break; | 261 break; |
262 } | 262 } |
263 #endif // defined(ENABLE_THEMES) | 263 #endif // defined(ENABLE_THEMES) |
264 case chrome::NOTIFICATION_PROFILE_DESTROYED: { | 264 case chrome::NOTIFICATION_PROFILE_DESTROYED: { |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 // could cause that, neither of which we support. | 465 // could cause that, neither of which we support. |
466 return; | 466 return; |
467 } | 467 } |
468 FOR_EACH_OBSERVER( | 468 FOR_EACH_OBSERVER( |
469 InstantServiceObserver, observers_, DefaultSearchProviderChanged()); | 469 InstantServiceObserver, observers_, DefaultSearchProviderChanged()); |
470 } | 470 } |
471 | 471 |
472 InstantNTPPrerenderer* InstantService::ntp_prerenderer() { | 472 InstantNTPPrerenderer* InstantService::ntp_prerenderer() { |
473 return &ntp_prerenderer_; | 473 return &ntp_prerenderer_; |
474 } | 474 } |
OLD | NEW |