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

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

Issue 870063002: Componentize TopSites, TopSitesBackend, TopSitesDatabase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@815983002
Patch Set: Fix typo Created 5 years, 10 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 "chrome/browser/chrome_notification_types.h" 7 #include "chrome/browser/chrome_notification_types.h"
8 #include "chrome/browser/history/top_sites.h"
9 #include "chrome/browser/history/top_sites_factory.h" 8 #include "chrome/browser/history/top_sites_factory.h"
10 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/search/instant_io_context.h" 10 #include "chrome/browser/search/instant_io_context.h"
12 #include "chrome/browser/search/instant_service_observer.h" 11 #include "chrome/browser/search/instant_service_observer.h"
13 #include "chrome/browser/search/most_visited_iframe_source.h" 12 #include "chrome/browser/search/most_visited_iframe_source.h"
14 #include "chrome/browser/search/search.h" 13 #include "chrome/browser/search/search.h"
15 #include "chrome/browser/search/suggestions/suggestions_source.h" 14 #include "chrome/browser/search/suggestions/suggestions_source.h"
16 #include "chrome/browser/search_engines/template_url_service_factory.h" 15 #include "chrome/browser/search_engines/template_url_service_factory.h"
17 #include "chrome/browser/search_engines/ui_thread_search_terms_data.h" 16 #include "chrome/browser/search_engines/ui_thread_search_terms_data.h"
18 #include "chrome/browser/themes/theme_properties.h" 17 #include "chrome/browser/themes/theme_properties.h"
19 #include "chrome/browser/themes/theme_service.h" 18 #include "chrome/browser/themes/theme_service.h"
20 #include "chrome/browser/themes/theme_service_factory.h" 19 #include "chrome/browser/themes/theme_service_factory.h"
21 #include "chrome/browser/thumbnails/thumbnail_list_source.h" 20 #include "chrome/browser/thumbnails/thumbnail_list_source.h"
22 #include "chrome/browser/ui/search/instant_search_prerenderer.h" 21 #include "chrome/browser/ui/search/instant_search_prerenderer.h"
23 #include "chrome/browser/ui/webui/favicon_source.h" 22 #include "chrome/browser/ui/webui/favicon_source.h"
24 #include "chrome/browser/ui/webui/ntp/thumbnail_source.h" 23 #include "chrome/browser/ui/webui/ntp/thumbnail_source.h"
25 #include "chrome/browser/ui/webui/theme_source.h" 24 #include "chrome/browser/ui/webui/theme_source.h"
26 #include "chrome/common/render_messages.h" 25 #include "chrome/common/render_messages.h"
26 #include "components/history/core/browser/top_sites.h"
27 #include "components/search_engines/template_url_service.h" 27 #include "components/search_engines/template_url_service.h"
28 #include "content/public/browser/browser_thread.h" 28 #include "content/public/browser/browser_thread.h"
29 #include "content/public/browser/notification_service.h" 29 #include "content/public/browser/notification_service.h"
30 #include "content/public/browser/notification_types.h" 30 #include "content/public/browser/notification_types.h"
31 #include "content/public/browser/render_process_host.h" 31 #include "content/public/browser/render_process_host.h"
32 #include "content/public/browser/url_data_source.h" 32 #include "content/public/browser/url_data_source.h"
33 #include "grit/theme_resources.h" 33 #include "grit/theme_resources.h"
34 #include "third_party/skia/include/core/SkColor.h" 34 #include "third_party/skia/include/core/SkColor.h"
35 #include "ui/gfx/color_utils.h" 35 #include "ui/gfx/color_utils.h"
36 #include "ui/gfx/image/image_skia.h" 36 #include "ui/gfx/image/image_skia.h"
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 } 433 }
434 434
435 void InstantService::ResetInstantSearchPrerenderer() { 435 void InstantService::ResetInstantSearchPrerenderer() {
436 if (!chrome::ShouldPrefetchSearchResults()) 436 if (!chrome::ShouldPrefetchSearchResults())
437 return; 437 return;
438 438
439 GURL url(chrome::GetSearchResultPrefetchBaseURL(profile_)); 439 GURL url(chrome::GetSearchResultPrefetchBaseURL(profile_));
440 instant_prerenderer_.reset( 440 instant_prerenderer_.reset(
441 url.is_valid() ? new InstantSearchPrerenderer(profile_, url) : NULL); 441 url.is_valid() ? new InstantSearchPrerenderer(profile_, url) : NULL);
442 } 442 }
OLDNEW
« no previous file with comments | « chrome/browser/precache/most_visited_urls_provider.cc ('k') | chrome/browser/thumbnails/thumbnail_list_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698