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

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

Issue 149223: Change ThumbnailStore to use sqlite instead of individual files. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « chrome/browser/profile.cc ('k') | chrome/browser/thumbnail_store.h » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/file_version_info.h" 9 #include "base/file_version_info.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after
1629 void TabContents::UpdateTargetURL(int32 page_id, const GURL& url) { 1629 void TabContents::UpdateTargetURL(int32 page_id, const GURL& url) {
1630 if (delegate()) 1630 if (delegate())
1631 delegate()->UpdateTargetURL(this, url); 1631 delegate()->UpdateTargetURL(this, url);
1632 } 1632 }
1633 1633
1634 void TabContents::UpdateThumbnail(const GURL& url, 1634 void TabContents::UpdateThumbnail(const GURL& url,
1635 const SkBitmap& bitmap, 1635 const SkBitmap& bitmap,
1636 const ThumbnailScore& score) { 1636 const ThumbnailScore& score) {
1637 // Tell History about this thumbnail 1637 // Tell History about this thumbnail
1638 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kThumbnailStore)) { 1638 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kThumbnailStore)) {
1639 profile()->GetThumbnailStore()-> 1639 if (!profile()->IsOffTheRecord())
1640 SetPageThumbnail(url, bitmap, score, !profile()->IsOffTheRecord()); 1640 profile()->GetThumbnailStore()->SetPageThumbnail(url, bitmap, score);
1641 } else { 1641 } else {
1642 HistoryService* hs; 1642 HistoryService* hs;
1643 if (!profile()->IsOffTheRecord() && 1643 if (!profile()->IsOffTheRecord() &&
1644 (hs = profile()->GetHistoryService(Profile::IMPLICIT_ACCESS))) { 1644 (hs = profile()->GetHistoryService(Profile::IMPLICIT_ACCESS))) {
1645 hs->SetPageThumbnail(url, bitmap, score); 1645 hs->SetPageThumbnail(url, bitmap, score);
1646 } 1646 }
1647 } 1647 }
1648 } 1648 }
1649 1649
1650 void TabContents::UpdateInspectorSettings(const std::wstring& raw_settings) { 1650 void TabContents::UpdateInspectorSettings(const std::wstring& raw_settings) {
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
2322 NavigationController::LoadCommittedDetails& committed_details = 2322 NavigationController::LoadCommittedDetails& committed_details =
2323 *(Details<NavigationController::LoadCommittedDetails>(details).ptr()); 2323 *(Details<NavigationController::LoadCommittedDetails>(details).ptr());
2324 ExpireInfoBars(committed_details); 2324 ExpireInfoBars(committed_details);
2325 break; 2325 break;
2326 } 2326 }
2327 2327
2328 default: 2328 default:
2329 NOTREACHED(); 2329 NOTREACHED();
2330 } 2330 }
2331 } 2331 }
OLDNEW
« no previous file with comments | « chrome/browser/profile.cc ('k') | chrome/browser/thumbnail_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698