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

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: 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 2682 matching lines...) Expand 10 before | Expand all | Expand 10 after
2693 delegate()->UpdateTargetURL(this, url); 2693 delegate()->UpdateTargetURL(this, url);
2694 } 2694 }
2695 2695
2696 void TabContents::UpdateThumbnail(const GURL& url, 2696 void TabContents::UpdateThumbnail(const GURL& url,
2697 const SkBitmap& bitmap, 2697 const SkBitmap& bitmap,
2698 const ThumbnailScore& score) { 2698 const ThumbnailScore& score) {
2699 if (profile()->IsOffTheRecord()) 2699 if (profile()->IsOffTheRecord())
2700 return; 2700 return;
2701 2701
2702 // Tell History about this thumbnail 2702 // Tell History about this thumbnail
2703 if (history::TopSites::IsEnabled()) { 2703 history::TopSites* ts = profile()->GetTopSites();
2704 history::TopSites* ts = profile()->GetTopSites(); 2704 if (ts)
2705 if (ts) 2705 ts->SetPageThumbnail(url, bitmap, score);
2706 ts->SetPageThumbnail(url, bitmap, score);
2707 } else {
2708 HistoryService* hs =
2709 profile()->GetHistoryService(Profile::IMPLICIT_ACCESS);
2710 if (hs)
2711 hs->SetPageThumbnail(url, bitmap, score);
2712 }
2713 } 2706 }
2714 2707
2715 void TabContents::UpdateInspectorSetting(const std::string& key, 2708 void TabContents::UpdateInspectorSetting(const std::string& key,
2716 const std::string& value) { 2709 const std::string& value) {
2717 RenderViewHostDelegateHelper::UpdateInspectorSetting(profile(), key, value); 2710 RenderViewHostDelegateHelper::UpdateInspectorSetting(profile(), key, value);
2718 } 2711 }
2719 2712
2720 void TabContents::ClearInspectorSettings() { 2713 void TabContents::ClearInspectorSettings() {
2721 RenderViewHostDelegateHelper::ClearInspectorSettings(profile()); 2714 RenderViewHostDelegateHelper::ClearInspectorSettings(profile());
2722 } 2715 }
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
3363 } 3356 }
3364 3357
3365 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { 3358 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) {
3366 render_manager_.SwapInRenderViewHost(rvh); 3359 render_manager_.SwapInRenderViewHost(rvh);
3367 } 3360 }
3368 3361
3369 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 3362 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
3370 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); 3363 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh);
3371 rwh_view->SetSize(view()->GetContainerSize()); 3364 rwh_view->SetSize(view()->GetContainerSize());
3372 } 3365 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698