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

Side by Side Diff: chrome/browser/ui/webui/ntp/thumbnail_source.h

Issue 15907006: Rip out browser-side RID caching for most visited items. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 7 years, 6 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_UI_WEBUI_NTP_THUMBNAIL_SOURCE_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_THUMBNAIL_SOURCE_H_
6 #define CHROME_BROWSER_UI_WEBUI_NTP_THUMBNAIL_SOURCE_H_ 6 #define CHROME_BROWSER_UI_WEBUI_NTP_THUMBNAIL_SOURCE_H_
7 7
8 #include <map>
9 #include <string> 8 #include <string>
10 9
11 #include "base/basictypes.h" 10 #include "base/basictypes.h"
12 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
13 #include "content/public/browser/url_data_source.h" 12 #include "content/public/browser/url_data_source.h"
14 13
15 class Profile; 14 class Profile;
16 15
17 namespace base { 16 namespace base {
18 class RefCountedMemory; 17 class RefCountedMemory;
(...skipping 25 matching lines...) Expand all
44 private: 43 private:
45 virtual ~ThumbnailSource(); 44 virtual ~ThumbnailSource();
46 45
47 // Raw PNG representation of the thumbnail to show when the thumbnail 46 // Raw PNG representation of the thumbnail to show when the thumbnail
48 // database doesn't have a thumbnail for a webpage. 47 // database doesn't have a thumbnail for a webpage.
49 scoped_refptr<base::RefCountedMemory> default_thumbnail_; 48 scoped_refptr<base::RefCountedMemory> default_thumbnail_;
50 49
51 // ThumbnailService. 50 // ThumbnailService.
52 scoped_refptr<thumbnails::ThumbnailService> thumbnail_service_; 51 scoped_refptr<thumbnails::ThumbnailService> thumbnail_service_;
53 52
54 // Transient mappings from an ID-based path to an URL-based path.
55 // The key is an ID-string, the value is a URL string.
56 // Mappings are added in ShouldServiceRequest() and erased once
57 // the request is serviced in StartDataRequest().
58 // TODO(dhollowa): Consider passing the |request| object through
59 // to the StartDataRequest() call.
60 mutable std::map<std::string, std::string> id_to_url_map_;
61
62 // Only used when servicing requests on the UI thread. 53 // Only used when servicing requests on the UI thread.
63 Profile* const profile_; 54 Profile* const profile_;
64 55
65 DISALLOW_COPY_AND_ASSIGN(ThumbnailSource); 56 DISALLOW_COPY_AND_ASSIGN(ThumbnailSource);
66 }; 57 };
67 58
68 #endif // CHROME_BROWSER_UI_WEBUI_NTP_THUMBNAIL_SOURCE_H_ 59 #endif // CHROME_BROWSER_UI_WEBUI_NTP_THUMBNAIL_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698