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

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

Issue 13945023: Make URLDataSource::GetSource() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: And another one. Created 7 years, 8 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_SCREENSHOT_SOURCE_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SCREENSHOT_SOURCE_H_
6 #define CHROME_BROWSER_UI_WEBUI_SCREENSHOT_SOURCE_H_ 6 #define CHROME_BROWSER_UI_WEBUI_SCREENSHOT_SOURCE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 // Common access for the screenshot directory, parameter is set to the 44 // Common access for the screenshot directory, parameter is set to the
45 // requested directory and return value of true is given upon success. 45 // requested directory and return value of true is given upon success.
46 static bool GetScreenshotDirectory(base::FilePath* directory); 46 static bool GetScreenshotDirectory(base::FilePath* directory);
47 #endif 47 #endif
48 48
49 // Get the basefilename for screenshots 49 // Get the basefilename for screenshots
50 static std::string GetScreenshotBaseFilename(); 50 static std::string GetScreenshotBaseFilename();
51 51
52 // content::URLDataSource implementation. 52 // content::URLDataSource implementation.
53 virtual std::string GetSource() OVERRIDE; 53 virtual std::string GetSource() const OVERRIDE;
54 virtual void StartDataRequest( 54 virtual void StartDataRequest(
55 const std::string& path, 55 const std::string& path,
56 bool is_incognito, 56 bool is_incognito,
57 const content::URLDataSource::GotDataCallback& callback) OVERRIDE; 57 const content::URLDataSource::GotDataCallback& callback) OVERRIDE;
58 virtual std::string GetMimeType(const std::string&) const OVERRIDE; 58 virtual std::string GetMimeType(const std::string&) const OVERRIDE;
59 59
60 // Get the screenshot specified by the given relative path that we've cached 60 // Get the screenshot specified by the given relative path that we've cached
61 // from a previous request to the screenshots source. 61 // from a previous request to the screenshots source.
62 // Note: This method strips the query string from the given path. 62 // Note: This method strips the query string from the given path.
63 ScreenshotDataPtr GetCachedScreenshot(const std::string& screenshot_path); 63 ScreenshotDataPtr GetCachedScreenshot(const std::string& screenshot_path);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 Profile* profile_; 117 Profile* profile_;
118 118
119 // Key: Relative path to the screenshot (including filename) 119 // Key: Relative path to the screenshot (including filename)
120 // Value: Pointer to the screenshot data associated with the path. 120 // Value: Pointer to the screenshot data associated with the path.
121 std::map<std::string, ScreenshotDataPtr> cached_screenshots_; 121 std::map<std::string, ScreenshotDataPtr> cached_screenshots_;
122 122
123 DISALLOW_COPY_AND_ASSIGN(ScreenshotSource); 123 DISALLOW_COPY_AND_ASSIGN(ScreenshotSource);
124 }; 124 };
125 125
126 #endif // CHROME_BROWSER_UI_WEBUI_SCREENSHOT_SOURCE_H_ 126 #endif // CHROME_BROWSER_UI_WEBUI_SCREENSHOT_SOURCE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/options_ui.cc ('k') | chrome/browser/ui/webui/screenshot_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698