Add WARN_UNUSED_RESULT to [Final]Extension

See https://codereview.chromium.org/863583002/.

R=mark@chromium.org

Review URL: https://codereview.chromium.org/863593003

Cr-Commit-Position: refs/heads/master@{#312237}


CrOS-Libchrome-Original-Commit: 9d51ce564886367ccf2f2d00b479d65859813492
diff --git a/base/files/file_path.h b/base/files/file_path.h
index 6890866..67bbb4b 100644
--- a/base/files/file_path.h
+++ b/base/files/file_path.h
@@ -238,7 +238,7 @@
   // ASSERT(new_path == path.value());
   // NOTE: this is different from the original file_util implementation which
   // returned the extension without a leading "." ("jpg" instead of ".jpg")
-  StringType Extension() const;
+  StringType Extension() const WARN_UNUSED_RESULT;
 
   // Returns the path's file extension, as in Extension(), but will
   // never return a double extension.
@@ -247,7 +247,7 @@
   // we can rename this to Extension() and the other to something like
   // LongExtension(), defaulting to short extensions and leaving the
   // long "extensions" to logic like base::GetUniquePathNumber().
-  StringType FinalExtension() const;
+  StringType FinalExtension() const WARN_UNUSED_RESULT;
 
   // Returns "C:\pics\jojo" for path "C:\pics\jojo.jpg"
   // NOTE: this is slightly different from the similar file_util implementation