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

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

Issue 18722: Revert r8560 due to broken interactive_ui_tests (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Created 11 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
« no previous file with comments | « base/process_util_win.cc ('k') | chrome/browser/bookmarks/bookmark_utils.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/base_history_model.h" 5 #include "chrome/browser/base_history_model.h"
6 6
7 #include "base/gfx/png_decoder.h" 7 #include "base/gfx/png_decoder.h"
8 #include "chrome/app/theme/theme_resources.h" 8 #include "chrome/app/theme/theme_resources.h"
9 #include "chrome/browser/profile.h" 9 #include "chrome/browser/profile.h"
10 #include "chrome/common/jpeg_codec.h" 10 #include "chrome/common/jpeg_codec.h"
11 #include "chrome/common/resource_bundle.h" 11 #include "chrome/common/resource_bundle.h"
12 #include "SkBitmap.h" 12 #include "SkBitmap.h"
13 13
14 // Size of the favicon and thumbnail caches. 14 // Size of the favicon and thumbnail caches.
15 static const int kThumbnailCacheSize = 100; 15 static const int kThumbnailCacheSize = 100;
16 16
17 // Icon to display when one isn't found for the page. 17 // Icon to display when one isn't found for the page.
18 static SkBitmap* kDefaultFavicon = NULL; 18 static SkBitmap* kDefaultFavicon = NULL;
19 19
20 // static 20 // static
21 const int BaseHistoryModel::kHistoryScopeMonths = 18; 21 const int BaseHistoryModel::kHistoryScopeMonths = 18;
22 22
23 BaseHistoryModel::BaseHistoryModel(Profile* profile) 23 BaseHistoryModel::BaseHistoryModel(Profile* profile)
24 : profile_(profile), 24 : profile_(profile),
25 observer_(NULL), 25 observer_(NULL),
26 is_search_results_(false),
27 thumbnails_(kThumbnailCacheSize), 26 thumbnails_(kThumbnailCacheSize),
28 favicons_(kThumbnailCacheSize) { 27 favicons_(kThumbnailCacheSize),
28 is_search_results_(false) {
29 if (!kDefaultFavicon) { 29 if (!kDefaultFavicon) {
30 kDefaultFavicon = ResourceBundle::GetSharedInstance(). 30 kDefaultFavicon = ResourceBundle::GetSharedInstance().
31 GetBitmapNamed(IDR_DEFAULT_FAVICON); 31 GetBitmapNamed(IDR_DEFAULT_FAVICON);
32 } 32 }
33 } 33 }
34 34
35 BaseHistoryModel::~BaseHistoryModel() { 35 BaseHistoryModel::~BaseHistoryModel() {
36 } 36 }
37 37
38 void BaseHistoryModel::SetObserver(BaseHistoryModelObserver* observer) { 38 void BaseHistoryModel::SetObserver(BaseHistoryModelObserver* observer) {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 } 149 }
150 history::URLID page = 150 history::URLID page =
151 cancelable_consumer_.GetClientData( 151 cancelable_consumer_.GetClientData(
152 profile_->GetHistoryService(Profile::EXPLICIT_ACCESS), handle); 152 profile_->GetHistoryService(Profile::EXPLICIT_ACCESS), handle);
153 favicons_.Put(page, fav_icon); 153 favicons_.Put(page, fav_icon);
154 154
155 if (observer_) 155 if (observer_)
156 observer_->ModelChanged(false); 156 observer_->ModelChanged(false);
157 } 157 }
158 158
OLDNEW
« no previous file with comments | « base/process_util_win.cc ('k') | chrome/browser/bookmarks/bookmark_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698