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

Side by Side Diff: chrome/browser/tab_contents/tab_contents.cc

Issue 6283001: Remove TopSites::IsEnabled() as well as related dead code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove OnThumbnailDataAvailable Created 9 years, 11 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
« no previous file with comments | « chrome/browser/history/top_sites_unittest.cc ('k') | chrome/common/chrome_switches.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/tab_contents/tab_contents.h" 5 #include "chrome/browser/tab_contents/tab_contents.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 2697 matching lines...) Expand 10 before | Expand all | Expand 10 after
2708 delegate()->UpdateTargetURL(this, url); 2708 delegate()->UpdateTargetURL(this, url);
2709 } 2709 }
2710 2710
2711 void TabContents::UpdateThumbnail(const GURL& url, 2711 void TabContents::UpdateThumbnail(const GURL& url,
2712 const SkBitmap& bitmap, 2712 const SkBitmap& bitmap,
2713 const ThumbnailScore& score) { 2713 const ThumbnailScore& score) {
2714 if (profile()->IsOffTheRecord()) 2714 if (profile()->IsOffTheRecord())
2715 return; 2715 return;
2716 2716
2717 // Tell History about this thumbnail 2717 // Tell History about this thumbnail
2718 if (history::TopSites::IsEnabled()) { 2718 history::TopSites* ts = profile()->GetTopSites();
2719 history::TopSites* ts = profile()->GetTopSites(); 2719 if (ts)
2720 if (ts) 2720 ts->SetPageThumbnail(url, bitmap, score);
2721 ts->SetPageThumbnail(url, bitmap, score);
2722 } else {
2723 HistoryService* hs =
2724 profile()->GetHistoryService(Profile::IMPLICIT_ACCESS);
2725 if (hs)
2726 hs->SetPageThumbnail(url, bitmap, score);
2727 }
2728 } 2721 }
2729 2722
2730 void TabContents::UpdateInspectorSetting(const std::string& key, 2723 void TabContents::UpdateInspectorSetting(const std::string& key,
2731 const std::string& value) { 2724 const std::string& value) {
2732 RenderViewHostDelegateHelper::UpdateInspectorSetting(profile(), key, value); 2725 RenderViewHostDelegateHelper::UpdateInspectorSetting(profile(), key, value);
2733 } 2726 }
2734 2727
2735 void TabContents::ClearInspectorSettings() { 2728 void TabContents::ClearInspectorSettings() {
2736 RenderViewHostDelegateHelper::ClearInspectorSettings(profile()); 2729 RenderViewHostDelegateHelper::ClearInspectorSettings(profile());
2737 } 2730 }
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
3378 } 3371 }
3379 3372
3380 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { 3373 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) {
3381 render_manager_.SwapInRenderViewHost(rvh); 3374 render_manager_.SwapInRenderViewHost(rvh);
3382 } 3375 }
3383 3376
3384 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 3377 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
3385 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); 3378 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh);
3386 rwh_view->SetSize(view()->GetContainerSize()); 3379 rwh_view->SetSize(view()->GetContainerSize());
3387 } 3380 }
OLDNEW
« no previous file with comments | « chrome/browser/history/top_sites_unittest.cc ('k') | chrome/common/chrome_switches.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698