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

Side by Side Diff: chrome/browser/chromeos/settings/owner_flags_storage.cc

Issue 819133004: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/settings/owner_flags_storage.h" 5 #include "chrome/browser/chromeos/settings/owner_flags_storage.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/about_flags.h" 10 #include "chrome/browser/about_flags.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } 45 }
46 } 46 }
47 47
48 OwnerFlagsStorage::~OwnerFlagsStorage() {} 48 OwnerFlagsStorage::~OwnerFlagsStorage() {}
49 49
50 bool OwnerFlagsStorage::SetFlags(const std::set<std::string>& flags) { 50 bool OwnerFlagsStorage::SetFlags(const std::set<std::string>& flags) {
51 PrefServiceFlagsStorage::SetFlags(flags); 51 PrefServiceFlagsStorage::SetFlags(flags);
52 52
53 base::ListValue experiments_list; 53 base::ListValue experiments_list;
54 54
55 CommandLine command_line(CommandLine::NO_PROGRAM); 55 base::CommandLine command_line(base::CommandLine::NO_PROGRAM);
56 ::about_flags::ConvertFlagsToSwitches(this, &command_line, 56 ::about_flags::ConvertFlagsToSwitches(this, &command_line,
57 ::about_flags::kNoSentinels); 57 ::about_flags::kNoSentinels);
58 CommandLine::StringVector switches = command_line.argv(); 58 base::CommandLine::StringVector switches = command_line.argv();
59 for (CommandLine::StringVector::const_iterator it = switches.begin() + 1; 59 for (base::CommandLine::StringVector::const_iterator it =
60 switches.begin() + 1;
60 it != switches.end(); ++it) { 61 it != switches.end(); ++it) {
61 experiments_list.Append(new base::StringValue(*it)); 62 experiments_list.Append(new base::StringValue(*it));
62 } 63 }
63 cros_settings_->Set(kStartUpFlags, experiments_list); 64 cros_settings_->Set(kStartUpFlags, experiments_list);
64 65
65 return true; 66 return true;
66 } 67 }
67 68
68 } // namespace about_flags 69 } // namespace about_flags
69 } // namespace chromeos 70 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/settings/cros_settings.cc ('k') | chrome/browser/chromeos/system/device_disabling_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698