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

Side by Side Diff: chrome/browser/thumbnails/thumbnail_list_source.h

Issue 648653003: Standardize usage of virtual/override/final in chrome/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_THUMBNAILS_THUMBNAIL_LIST_SOURCE_H_ 5 #ifndef CHROME_BROWSER_THUMBNAILS_THUMBNAIL_LIST_SOURCE_H_
6 #define CHROME_BROWSER_THUMBNAILS_THUMBNAIL_LIST_SOURCE_H_ 6 #define CHROME_BROWSER_THUMBNAILS_THUMBNAIL_LIST_SOURCE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 14 matching lines...) Expand all
25 25
26 // ThumbnailListSource renders a webpage to list all thumbnails stored in 26 // ThumbnailListSource renders a webpage to list all thumbnails stored in
27 // TopSites, along with all associated URLs. The thumbnail images are embedded 27 // TopSites, along with all associated URLs. The thumbnail images are embedded
28 // into the HTML via Base64, so we can easily produce a dump of TopSites and 28 // into the HTML via Base64, so we can easily produce a dump of TopSites and
29 // the thumbnails it stores. 29 // the thumbnails it stores.
30 class ThumbnailListSource : public content::URLDataSource { 30 class ThumbnailListSource : public content::URLDataSource {
31 public: 31 public:
32 explicit ThumbnailListSource(Profile* profile); 32 explicit ThumbnailListSource(Profile* profile);
33 33
34 // content::URLDataSource implementation. 34 // content::URLDataSource implementation.
35 virtual std::string GetSource() const override; 35 std::string GetSource() const override;
36 virtual void StartDataRequest( 36 void StartDataRequest(
37 const std::string& path, 37 const std::string& path,
38 int render_process_id, 38 int render_process_id,
39 int render_frame_id, 39 int render_frame_id,
40 const content::URLDataSource::GotDataCallback& callback) override; 40 const content::URLDataSource::GotDataCallback& callback) override;
41 virtual std::string GetMimeType(const std::string& path) const override; 41 std::string GetMimeType(const std::string& path) const override;
42 virtual base::MessageLoop* MessageLoopForRequestPath( 42 base::MessageLoop* MessageLoopForRequestPath(
43 const std::string& path) const override; 43 const std::string& path) const override;
44 virtual bool ShouldServiceRequest( 44 bool ShouldServiceRequest(const net::URLRequest* request) const override;
45 const net::URLRequest* request) const override; 45 bool ShouldReplaceExistingSource() const override;
46 virtual bool ShouldReplaceExistingSource() const override;
47 46
48 private: 47 private:
49 virtual ~ThumbnailListSource(); 48 ~ThumbnailListSource() override;
50 49
51 void OnMostVisitedURLsAvailable( 50 void OnMostVisitedURLsAvailable(
52 const content::URLDataSource::GotDataCallback& callback, 51 const content::URLDataSource::GotDataCallback& callback,
53 const history::MostVisitedURLList& mvurl_list); 52 const history::MostVisitedURLList& mvurl_list);
54 53
55 // ThumbnailService. 54 // ThumbnailService.
56 scoped_refptr<thumbnails::ThumbnailService> thumbnail_service_; 55 scoped_refptr<thumbnails::ThumbnailService> thumbnail_service_;
57 56
58 // Only used when servicing requests on the UI thread. 57 // Only used when servicing requests on the UI thread.
59 Profile* const profile_; 58 Profile* const profile_;
60 59
61 // For callbacks may be run after destruction. 60 // For callbacks may be run after destruction.
62 base::WeakPtrFactory<ThumbnailListSource> weak_ptr_factory_; 61 base::WeakPtrFactory<ThumbnailListSource> weak_ptr_factory_;
63 62
64 DISALLOW_COPY_AND_ASSIGN(ThumbnailListSource); 63 DISALLOW_COPY_AND_ASSIGN(ThumbnailListSource);
65 }; 64 };
66 65
67 66
68 #endif // CHROME_BROWSER_THUMBNAILS_THUMBNAIL_LIST_SOURCE_H_ 67 #endif // CHROME_BROWSER_THUMBNAILS_THUMBNAIL_LIST_SOURCE_H_
OLDNEW
« no previous file with comments | « chrome/browser/thumbnails/simple_thumbnail_crop.h ('k') | chrome/browser/thumbnails/thumbnail_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698