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

Unified Diff: chrome/browser/ui/webui/web_ui_util.h

Issue 10837270: webui: Change slightly how the scale-factor gets parsed from a URL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: indent Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/web_ui_util.h
diff --git a/chrome/browser/ui/webui/web_ui_util.h b/chrome/browser/ui/webui/web_ui_util.h
index 6c877720f59a3c7f3abc691bc85b6f1172e4230a..342423fb8d9a746b65856aa10a23141b0c74afc3 100644
--- a/chrome/browser/ui/webui/web_ui_util.h
+++ b/chrome/browser/ui/webui/web_ui_util.h
@@ -38,9 +38,12 @@ std::string GetImageDataUrlFromResource(int resource_id);
WindowOpenDisposition GetDispositionFromClick(const ListValue* args,
int start_index);
-// Given a scale factor such as "1x" or "2x" returns the ScaleFactor enum
-// value for this scale factor.
-ui::ScaleFactor ParseScaleFactor(const base::StringPiece& identifier);
+// Given a scale factor such as "1x" or "2x", sets |scale_factor| to the
+// ScaleFactor enum value for this scale factor. If the scale factor could not
+// be determined correctly from the string, then |scale_factor| is set to
+// SCALE_FACTOR_NONE, and false is returned.
+bool ParseScaleFactor(const base::StringPiece& identifier,
+ ui::ScaleFactor* scale_factor);
// Parses a URL containing some path @{scale}x. If it does not contain a scale
// factor then the default scale factor is returned.
« no previous file with comments | « chrome/browser/ui/webui/options2/chromeos/user_image_source.cc ('k') | chrome/browser/ui/webui/web_ui_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698