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

Unified Diff: extensions/common/extension_paths.cc

Issue 203043002: Fix "unreachable code" warnings (MSVC warning 4702), misc. edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 9 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: extensions/common/extension_paths.cc
===================================================================
--- extensions/common/extension_paths.cc (revision 256983)
+++ extensions/common/extension_paths.cc (working copy)
@@ -10,26 +10,18 @@
namespace extensions {
bool PathProvider(int key, base::FilePath* result) {
- switch (key) {
- case DIR_TEST_DATA: {
- base::FilePath cur;
- if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur))
- return false;
- cur = cur.Append(FILE_PATH_LITERAL("extensions"));
- cur = cur.Append(FILE_PATH_LITERAL("test"));
- cur = cur.Append(FILE_PATH_LITERAL("data"));
- if (!base::PathExists(cur)) // we don't want to create this
- return false;
-
- *result = cur;
- return true;
- break;
- }
- default:
- return false;
- }
-
- return false;
+ if (key != DIR_TEST_DATA)
+ return false;
+ base::FilePath cur;
+ if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur))
+ return false;
+ cur = cur.Append(FILE_PATH_LITERAL("extensions"));
+ cur = cur.Append(FILE_PATH_LITERAL("test"));
+ cur = cur.Append(FILE_PATH_LITERAL("data"));
+ if (!base::PathExists(cur)) // we don't want to create this
+ return false;
+ *result = cur;
+ return true;
}
// This cannot be done as a static initializer sadly since Visual Studio will

Powered by Google App Engine
This is Rietveld 408576698