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

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

Issue 2476433002: Replace URLDataSource::MessageLoopForRequestPath() with TaskRunnerForRequestPath(). (Closed)
Patch Set: rebase off local branch Created 4 years, 1 month 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/macros.h" 10 #include "base/macros.h"
(...skipping 26 matching lines...) Expand all
37 37
38 // content::URLDataSource implementation. 38 // content::URLDataSource implementation.
39 std::string GetSource() const override; 39 std::string GetSource() const override;
40 // Called on the IO thread. 40 // Called on the IO thread.
41 void StartDataRequest( 41 void StartDataRequest(
42 const std::string& path, 42 const std::string& path,
43 const content::ResourceRequestInfo::WebContentsGetter& wc_getter, 43 const content::ResourceRequestInfo::WebContentsGetter& wc_getter,
44 const content::URLDataSource::GotDataCallback& callback) override; 44 const content::URLDataSource::GotDataCallback& callback) override;
45 45
46 std::string GetMimeType(const std::string& path) const override; 46 std::string GetMimeType(const std::string& path) const override;
47 base::MessageLoop* MessageLoopForRequestPath( 47 scoped_refptr<base::SingleThreadTaskRunner> TaskRunnerForRequestPath(
48 const std::string& path) const override; 48 const std::string& path) const override;
49 bool ShouldServiceRequest(const net::URLRequest* request) const override; 49 bool ShouldServiceRequest(const net::URLRequest* request) const override;
50 bool ShouldReplaceExistingSource() const override; 50 bool ShouldReplaceExistingSource() const override;
51 51
52 private: 52 private:
53 ~ThumbnailListSource() override; 53 ~ThumbnailListSource() override;
54 54
55 // Called on the IO thread. 55 // Called on the IO thread.
56 void OnMostVisitedURLsAvailable( 56 void OnMostVisitedURLsAvailable(
57 const content::URLDataSource::GotDataCallback& callback, 57 const content::URLDataSource::GotDataCallback& callback,
58 const history::MostVisitedURLList& mvurl_list); 58 const history::MostVisitedURLList& mvurl_list);
59 59
60 // ThumbnailService. 60 // ThumbnailService.
61 scoped_refptr<thumbnails::ThumbnailService> thumbnail_service_; 61 scoped_refptr<thumbnails::ThumbnailService> thumbnail_service_;
62 62
63 scoped_refptr<history::TopSites> top_sites_; 63 scoped_refptr<history::TopSites> top_sites_;
64 64
65 // For callbacks may be run after destruction. 65 // For callbacks may be run after destruction.
66 base::WeakPtrFactory<ThumbnailListSource> weak_ptr_factory_; 66 base::WeakPtrFactory<ThumbnailListSource> weak_ptr_factory_;
67 67
68 DISALLOW_COPY_AND_ASSIGN(ThumbnailListSource); 68 DISALLOW_COPY_AND_ASSIGN(ThumbnailListSource);
69 }; 69 };
70 70
71 71
72 #endif // CHROME_BROWSER_THUMBNAILS_THUMBNAIL_LIST_SOURCE_H_ 72 #endif // CHROME_BROWSER_THUMBNAILS_THUMBNAIL_LIST_SOURCE_H_
OLDNEW
« no previous file with comments | « chrome/browser/search/thumbnail_source.cc ('k') | chrome/browser/thumbnails/thumbnail_list_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698