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

Unified Diff: chrome/browser/chromeos/settings/owner_flags_storage.cc

Issue 23983031: Owner flags storage should not save the flags names but the actual switches. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 7 years, 3 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 | « chrome/browser/chromeos/login/login_utils.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/settings/owner_flags_storage.cc
diff --git a/chrome/browser/chromeos/settings/owner_flags_storage.cc b/chrome/browser/chromeos/settings/owner_flags_storage.cc
index 38c2ba9a8f76d9534f7c0133485e30cf9a17043c..9c21c314c83e1bd786bda335b59fa3ab87040c40 100644
--- a/chrome/browser/chromeos/settings/owner_flags_storage.cc
+++ b/chrome/browser/chromeos/settings/owner_flags_storage.cc
@@ -4,8 +4,10 @@
#include "chrome/browser/chromeos/settings/owner_flags_storage.h"
+#include "base/command_line.h"
#include "base/prefs/pref_service.h"
#include "base/values.h"
+#include "chrome/browser/about_flags.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chromeos/settings/cros_settings.h"
#include "chrome/browser/chromeos/settings/cros_settings_names.h"
@@ -50,8 +52,12 @@ bool OwnerFlagsStorage::SetFlags(std::set<std::string> flags) {
base::ListValue experiments_list;
- for (std::set<std::string>::const_iterator it = flags.begin();
- it != flags.end(); ++it) {
+ CommandLine command_line(CommandLine::NO_PROGRAM);
+ ::about_flags::ConvertFlagsToSwitches(this, &command_line,
+ ::about_flags::kNoSentinels);
+ CommandLine::StringVector switches = command_line.argv();
+ for (CommandLine::StringVector::const_iterator it = switches.begin() + 1;
+ it != switches.end(); ++it) {
experiments_list.Append(new base::StringValue(*it));
}
cros_settings_->Set(kStartUpFlags, experiments_list);
« no previous file with comments | « chrome/browser/chromeos/login/login_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698