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

Side by Side Diff: chrome/browser/ui/webui/fileicon_source.h

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (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 (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_FILEICON_SOURCE_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_FILEICON_SOURCE_H_
6 #define CHROME_BROWSER_UI_WEBUI_FILEICON_SOURCE_H_ 6 #define CHROME_BROWSER_UI_WEBUI_FILEICON_SOURCE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/task/cancelable_task_tracker.h" 11 #include "base/task/cancelable_task_tracker.h"
12 #include "chrome/browser/icon_manager.h" 12 #include "chrome/browser/icon_manager.h"
13 #include "content/public/browser/url_data_source.h" 13 #include "content/public/browser/url_data_source.h"
14 14
15 namespace gfx { 15 namespace gfx {
16 class Image; 16 class Image;
17 } 17 }
18 18
19 // FileIconSource is the gateway between network-level chrome: 19 // FileIconSource is the gateway between network-level chrome:
20 // requests for favicons and the history backend that serves these. 20 // requests for favicons and the history backend that serves these.
21 class FileIconSource : public content::URLDataSource { 21 class FileIconSource : public content::URLDataSource {
22 public: 22 public:
23 explicit FileIconSource(); 23 explicit FileIconSource();
24 24
25 // content::URLDataSource implementation. 25 // content::URLDataSource implementation.
26 virtual std::string GetSource() const override; 26 std::string GetSource() const override;
27 virtual void StartDataRequest( 27 void StartDataRequest(
28 const std::string& path, 28 const std::string& path,
29 int render_process_id, 29 int render_process_id,
30 int render_frame_id, 30 int render_frame_id,
31 const content::URLDataSource::GotDataCallback& callback) override; 31 const content::URLDataSource::GotDataCallback& callback) override;
32 virtual std::string GetMimeType(const std::string&) const override; 32 std::string GetMimeType(const std::string&) const override;
33 33
34 protected: 34 protected:
35 virtual ~FileIconSource(); 35 ~FileIconSource() override;
36 36
37 // Once the |path| and |icon_size| has been determined from the request, this 37 // Once the |path| and |icon_size| has been determined from the request, this
38 // function is called to perform the actual fetch. Declared as virtual for 38 // function is called to perform the actual fetch. Declared as virtual for
39 // testing. 39 // testing.
40 virtual void FetchFileIcon( 40 virtual void FetchFileIcon(
41 const base::FilePath& path, 41 const base::FilePath& path,
42 float scale_factor, 42 float scale_factor,
43 IconLoader::IconSize icon_size, 43 IconLoader::IconSize icon_size,
44 const content::URLDataSource::GotDataCallback& callback); 44 const content::URLDataSource::GotDataCallback& callback);
45 45
(...skipping 13 matching lines...) Expand all
59 // Called when favicon data is available from the history backend. 59 // Called when favicon data is available from the history backend.
60 void OnFileIconDataAvailable(const IconRequestDetails& details, 60 void OnFileIconDataAvailable(const IconRequestDetails& details,
61 gfx::Image* icon); 61 gfx::Image* icon);
62 62
63 // Tracks tasks requesting file icons. 63 // Tracks tasks requesting file icons.
64 base::CancelableTaskTracker cancelable_task_tracker_; 64 base::CancelableTaskTracker cancelable_task_tracker_;
65 65
66 DISALLOW_COPY_AND_ASSIGN(FileIconSource); 66 DISALLOW_COPY_AND_ASSIGN(FileIconSource);
67 }; 67 };
68 #endif // CHROME_BROWSER_UI_WEBUI_FILEICON_SOURCE_H_ 68 #endif // CHROME_BROWSER_UI_WEBUI_FILEICON_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698