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

Side by Side Diff: chrome/browser/ui/webui/flags_ui.cc

Issue 816403003: 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/webui/flags_ui.h" 5 #include "chrome/browser/ui/webui/flags_ui.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 flags_storage_.get(), 215 flags_storage_.get(),
216 experiment_internal_name, 216 experiment_internal_name,
217 enable_str == "true"); 217 enable_str == "true");
218 } 218 }
219 219
220 void FlagsDOMHandler::HandleRestartBrowser(const base::ListValue* args) { 220 void FlagsDOMHandler::HandleRestartBrowser(const base::ListValue* args) {
221 DCHECK(flags_storage_); 221 DCHECK(flags_storage_);
222 #if defined(OS_CHROMEOS) 222 #if defined(OS_CHROMEOS)
223 // On ChromeOS be less intrusive and restart inside the user session after 223 // On ChromeOS be less intrusive and restart inside the user session after
224 // we apply the newly selected flags. 224 // we apply the newly selected flags.
225 CommandLine user_flags(CommandLine::NO_PROGRAM); 225 base::CommandLine user_flags(base::CommandLine::NO_PROGRAM);
226 about_flags::ConvertFlagsToSwitches(flags_storage_.get(), 226 about_flags::ConvertFlagsToSwitches(flags_storage_.get(),
227 &user_flags, 227 &user_flags,
228 about_flags::kAddSentinels); 228 about_flags::kAddSentinels);
229 CommandLine::StringVector flags; 229 base::CommandLine::StringVector flags;
230 // argv[0] is the program name |CommandLine::NO_PROGRAM|. 230 // argv[0] is the program name |base::CommandLine::NO_PROGRAM|.
231 flags.assign(user_flags.argv().begin() + 1, user_flags.argv().end()); 231 flags.assign(user_flags.argv().begin() + 1, user_flags.argv().end());
232 VLOG(1) << "Restarting to apply per-session flags..."; 232 VLOG(1) << "Restarting to apply per-session flags...";
233 chromeos::DBusThreadManager::Get() 233 chromeos::DBusThreadManager::Get()
234 ->GetSessionManagerClient() 234 ->GetSessionManagerClient()
235 ->SetFlagsForUser( 235 ->SetFlagsForUser(
236 user_manager::UserManager::Get()->GetActiveUser()->email(), flags); 236 user_manager::UserManager::Get()->GetActiveUser()->email(), flags);
237 #endif 237 #endif
238 chrome::AttemptRestart(); 238 chrome::AttemptRestart();
239 } 239 }
240 240
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 } 329 }
330 330
331 #if defined(OS_CHROMEOS) 331 #if defined(OS_CHROMEOS)
332 // static 332 // static
333 void FlagsUI::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { 333 void FlagsUI::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
334 registry->RegisterListPref(prefs::kEnabledLabsExperiments, 334 registry->RegisterListPref(prefs::kEnabledLabsExperiments,
335 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 335 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
336 } 336 }
337 337
338 #endif 338 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/downloads_ui_supervised_browsertest.cc ('k') | chrome/browser/ui/webui/help/help_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698