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

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

Issue 1165323004: We should use UserID object to identify users instead of username. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 (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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 base::CommandLine::StringVector flags; 229 base::CommandLine::StringVector flags;
230 // argv[0] is the program name |base::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()->GetUserID(), flags) ;
237 #endif 237 #endif
238 chrome::AttemptRestart(); 238 chrome::AttemptRestart();
239 } 239 }
240 240
241 void FlagsDOMHandler::HandleResetAllFlags(const base::ListValue* args) { 241 void FlagsDOMHandler::HandleResetAllFlags(const base::ListValue* args) {
242 DCHECK(flags_storage_); 242 DCHECK(flags_storage_);
243 about_flags::ResetAllFlags(flags_storage_.get()); 243 about_flags::ResetAllFlags(flags_storage_.get());
244 } 244 }
245 245
246 246
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 registry->RegisterListPref(prefs::kEnabledLabsExperiments); 330 registry->RegisterListPref(prefs::kEnabledLabsExperiments);
331 } 331 }
332 332
333 #if defined(OS_CHROMEOS) 333 #if defined(OS_CHROMEOS)
334 // static 334 // static
335 void FlagsUI::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { 335 void FlagsUI::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
336 registry->RegisterListPref(prefs::kEnabledLabsExperiments); 336 registry->RegisterListPref(prefs::kEnabledLabsExperiments);
337 } 337 }
338 338
339 #endif 339 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698