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

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

Issue 1411453004: Componentize internal class FlagsState in flags_ui component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@feature_entry
Patch Set: Fix compilation on Win32 Created 5 years, 1 month 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
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);
Alexei Svitkine (slow) 2015/11/16 21:52:54 Nit: No need for leading ::, since there's no long
sdefresne 2015/11/17 16:28:56 Done.
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698