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

Side by Side Diff: chrome/browser/fav_icon_helper.h

Issue 5753007: Make us save favicon in incognito mode if the url is bookmarked. This (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: Created 10 years 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 | « no previous file | chrome/browser/fav_icon_helper.cc » ('j') | chrome/browser/history/history.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_FAV_ICON_HELPER_H__ 5 #ifndef CHROME_BROWSER_FAV_ICON_HELPER_H__
6 #define CHROME_BROWSER_FAV_ICON_HELPER_H__ 6 #define CHROME_BROWSER_FAV_ICON_HELPER_H__
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 // If the TabContents has a delegate, it is notified of the new favicon 149 // If the TabContents has a delegate, it is notified of the new favicon
150 // (INVALIDATE_FAVICON). 150 // (INVALIDATE_FAVICON).
151 void UpdateFavIcon(NavigationEntry* entry, 151 void UpdateFavIcon(NavigationEntry* entry,
152 scoped_refptr<RefCountedMemory> data); 152 scoped_refptr<RefCountedMemory> data);
153 void UpdateFavIcon(NavigationEntry* entry, const SkBitmap& image); 153 void UpdateFavIcon(NavigationEntry* entry, const SkBitmap& image);
154 154
155 // Scales the image such that either the width and/or height is 16 pixels 155 // Scales the image such that either the width and/or height is 16 pixels
156 // wide. Does nothing if the image is empty. 156 // wide. Does nothing if the image is empty.
157 SkBitmap ConvertToFavIconSize(const SkBitmap& image); 157 SkBitmap ConvertToFavIconSize(const SkBitmap& image);
158 158
159 // Returns true if the favicon should be saved.
160 bool ShouldSaveFavicon(const GURL& url);
161
159 // Hosting TabContents. We callback into this when done. 162 // Hosting TabContents. We callback into this when done.
160 TabContents* tab_contents_; 163 TabContents* tab_contents_;
161 164
162 // Used for history requests. 165 // Used for history requests.
163 CancelableRequestConsumer cancelable_consumer_; 166 CancelableRequestConsumer cancelable_consumer_;
164 167
165 // URL of the page we're requesting the favicon for. 168 // URL of the page we're requesting the favicon for.
166 GURL url_; 169 GURL url_;
167 170
168 // Whether we got the url for the page back from the renderer. 171 // Whether we got the url for the page back from the renderer.
(...skipping 11 matching lines...) Expand all
180 bool fav_icon_expired_; 183 bool fav_icon_expired_;
181 184
182 // Requests to the renderer to download favicons. 185 // Requests to the renderer to download favicons.
183 typedef std::map<int, DownloadRequest> DownloadRequests; 186 typedef std::map<int, DownloadRequest> DownloadRequests;
184 DownloadRequests download_requests_; 187 DownloadRequests download_requests_;
185 188
186 DISALLOW_COPY_AND_ASSIGN(FavIconHelper); 189 DISALLOW_COPY_AND_ASSIGN(FavIconHelper);
187 }; 190 };
188 191
189 #endif // CHROME_BROWSER_FAV_ICON_HELPER_H__ 192 #endif // CHROME_BROWSER_FAV_ICON_HELPER_H__
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/fav_icon_helper.cc » ('j') | chrome/browser/history/history.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698