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

Unified Diff: url/gurl.h

Issue 19857005: Do not show translate bar for MHTML files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add and use GURL::ExtractFileExtension() Created 7 years, 5 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: url/gurl.h
diff --git a/url/gurl.h b/url/gurl.h
index 6e582499836b4bcc900983cf7c76348aa9329515..b7dcf308fc3bfbcff7d0614661a0e786da7345ea 100644
--- a/url/gurl.h
+++ b/url/gurl.h
@@ -292,6 +292,11 @@ class URL_EXPORT GURL {
// is everything after the last slash in the path. This may be empty.
std::string ExtractFileName() const;
+ // Extracts the file extension portion of the path and returns it. The file
+ // extension is everything after the last dot in the file name. This may be
+ // empty.
+ std::string ExtractFileExtension() const;
+
// Returns the path that should be sent to the server. This is the path,
// parameter, and query portions of the URL. It is guaranteed to be ASCII.
std::string PathForRequest() const;

Powered by Google App Engine
This is Rietveld 408576698