OLD | NEW |
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 OwnerFlagsStorage::~OwnerFlagsStorage() {} | 51 OwnerFlagsStorage::~OwnerFlagsStorage() {} |
52 | 52 |
53 bool OwnerFlagsStorage::SetFlags(const std::set<std::string>& flags) { | 53 bool OwnerFlagsStorage::SetFlags(const std::set<std::string>& flags) { |
54 PrefServiceFlagsStorage::SetFlags(flags); | 54 PrefServiceFlagsStorage::SetFlags(flags); |
55 | 55 |
56 base::ListValue experiments_list; | 56 base::ListValue experiments_list; |
57 | 57 |
58 base::CommandLine command_line(base::CommandLine::NO_PROGRAM); | 58 base::CommandLine command_line(base::CommandLine::NO_PROGRAM); |
59 ::about_flags::ConvertFlagsToSwitches(this, &command_line, | 59 ::about_flags::ConvertFlagsToSwitches(this, &command_line, |
60 ::about_flags::kNoSentinels); | 60 ::flags_ui::kNoSentinels); |
61 base::CommandLine::StringVector switches = command_line.argv(); | 61 base::CommandLine::StringVector switches = command_line.argv(); |
62 for (base::CommandLine::StringVector::const_iterator it = | 62 for (base::CommandLine::StringVector::const_iterator it = |
63 switches.begin() + 1; | 63 switches.begin() + 1; |
64 it != switches.end(); ++it) { | 64 it != switches.end(); ++it) { |
65 experiments_list.Append(new base::StringValue(*it)); | 65 experiments_list.Append(new base::StringValue(*it)); |
66 } | 66 } |
67 owner_settings_service_->Set(kStartUpFlags, experiments_list); | 67 owner_settings_service_->Set(kStartUpFlags, experiments_list); |
68 | 68 |
69 return true; | 69 return true; |
70 } | 70 } |
71 | 71 |
72 } // namespace about_flags | 72 } // namespace about_flags |
73 } // namespace chromeos | 73 } // namespace chromeos |
OLD | NEW |