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

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

Issue 14991005: Merge 199458 "Disable Drive API v2 for M-28 release." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1500/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
===================================================================
--- chrome/browser/google_apis/drive_api_util.cc (revision 199883)
+++ chrome/browser/google_apis/drive_api_util.cc (working copy)
@@ -19,16 +19,17 @@
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