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

Unified Diff: chrome/browser/google_apis/drive_api_util.cc

Issue 14858024: Disable Drive API v2 for M-28 release. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/google_apis/drive_api_util.cc
diff --git a/chrome/browser/google_apis/drive_api_util.cc b/chrome/browser/google_apis/drive_api_util.cc
index 6e6c253be0405a1ad009729e6bdad5bacbfd6737..a0274ff2df6fe9b7732134024f31b4f792aba275 100644
--- a/chrome/browser/google_apis/drive_api_util.cc
+++ b/chrome/browser/google_apis/drive_api_util.cc
@@ -19,16 +19,17 @@ namespace util {
bool IsDriveV2ApiEnabled() {
const CommandLine* command_line = CommandLine::ForCurrentProcess();
+
+ // Disable Drive API v2 by default.
+ if (!command_line->HasSwitch(switches::kEnableDriveV2Api))
+ return false;
+
std::string value =
command_line->GetSwitchValueASCII(switches::kEnableDriveV2Api);
StringToLowerASCII(&value);
- if (value == "false") {
- return false;
- }
-
- // The value should be empty or "true".
- DCHECK(value.empty() || value == "true");
- return true;
+ // The value must be "" or "true" for true, or "false" for false.
+ DCHECK(value.empty() || value == "true" || value == "false");
+ return value != "false";
}
} // namespace util
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698