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

Unified Diff: chrome/browser/ui/webui/options2/chromeos/user_image_source.cc

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
« no previous file with comments | « chrome/browser/ui/webui/fileicon_source.cc ('k') | chrome/browser/ui/webui/web_ui_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options2/chromeos/user_image_source.cc
diff --git a/chrome/browser/ui/webui/options2/chromeos/user_image_source.cc b/chrome/browser/ui/webui/options2/chromeos/user_image_source.cc
index c9bbb1ba10223f9a4e71309b94510aa37b29148a..a571ed7098ba9d618c2539bcba357c7d7bd116d2 100644
--- a/chrome/browser/ui/webui/options2/chromeos/user_image_source.cc
+++ b/chrome/browser/ui/webui/options2/chromeos/user_image_source.cc
@@ -31,21 +31,7 @@ void ParseRequest(const GURL& url,
bool* is_image_animated,
ui::ScaleFactor* scale_factor) {
DCHECK(url.is_valid());
-
- *email = url.path();
- email->erase(0, 1); // Strip initial slash.
-
- // TODO(ivankr): when all chrome://userimage URLs have a valid @<scale>x,
- // remove this and pass |email| instead of |&path| to ParsePathAndScale.
- size_t pos = email->find('@');
- if (pos != std::string::npos) {
- pos = email->find('@', pos + 1);
- if (pos != std::string::npos)
- email->erase(pos);
- }
- std::string path;
- web_ui_util::ParsePathAndScale(url, &path, scale_factor);
-
+ web_ui_util::ParsePathAndScale(url, email, scale_factor);
std::string url_spec = url.possibly_invalid_spec();
url_parse::Component query = url.parsed_for_possibly_invalid_spec().query;
url_parse::Component key, value;
« no previous file with comments | « chrome/browser/ui/webui/fileicon_source.cc ('k') | chrome/browser/ui/webui/web_ui_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698