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

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

Issue 2392693002: Rewrite simple uses of base::ListValue::Append(base::Value*) on CrOS. (Closed)
Patch Set: MakeUnique Created 4 years, 2 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 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/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/about_flags.h" 9 #include "chrome/browser/about_flags.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 19 matching lines...) Expand all
30 30
31 base::ListValue experiments_list; 31 base::ListValue experiments_list;
32 32
33 base::CommandLine command_line(base::CommandLine::NO_PROGRAM); 33 base::CommandLine command_line(base::CommandLine::NO_PROGRAM);
34 ::about_flags::ConvertFlagsToSwitches(this, &command_line, 34 ::about_flags::ConvertFlagsToSwitches(this, &command_line,
35 flags_ui::kNoSentinels); 35 flags_ui::kNoSentinels);
36 base::CommandLine::StringVector switches = command_line.argv(); 36 base::CommandLine::StringVector switches = command_line.argv();
37 for (base::CommandLine::StringVector::const_iterator it = 37 for (base::CommandLine::StringVector::const_iterator it =
38 switches.begin() + 1; 38 switches.begin() + 1;
39 it != switches.end(); ++it) { 39 it != switches.end(); ++it) {
40 experiments_list.Append(new base::StringValue(*it)); 40 experiments_list.AppendString(*it);
41 } 41 }
42 owner_settings_service_->Set(kStartUpFlags, experiments_list); 42 owner_settings_service_->Set(kStartUpFlags, experiments_list);
43 43
44 return true; 44 return true;
45 } 45 }
46 46
47 } // namespace about_flags 47 } // namespace about_flags
48 } // namespace chromeos 48 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/settings/device_settings_provider_unittest.cc ('k') | chrome/browser/chromeos/system/timezone_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698