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

Side by Side Diff: chrome/browser/profiles/profile_window.cc

Issue 1415953005: Componentize about_flags::FeatureEntry in flags_ui component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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
« no previous file with comments | « chrome/browser/about_flags_unittest.cc ('k') | components/flags_ui.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/profiles/profile_window.h" 5 #include "chrome/browser/profiles/profile_window.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 profiles::USER_MANAGER_TUTORIAL_OVERVIEW, 460 profiles::USER_MANAGER_TUTORIAL_OVERVIEW,
461 profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION); 461 profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION);
462 } 462 }
463 463
464 void EnableNewProfileManagementPreview(Profile* profile) { 464 void EnableNewProfileManagementPreview(Profile* profile) {
465 #if defined(OS_ANDROID) 465 #if defined(OS_ANDROID)
466 NOTREACHED(); 466 NOTREACHED();
467 #else 467 #else
468 // TODO(rogerta): instead of setting experiment flags and command line 468 // TODO(rogerta): instead of setting experiment flags and command line
469 // args, we should set a profile preference. 469 // args, we should set a profile preference.
470 const about_flags::FeatureEntry entry = { 470 const flags_ui::FeatureEntry entry = {
471 kNewProfileManagementExperimentInternalName, 471 kNewProfileManagementExperimentInternalName,
472 0, // string id for title of experiment 472 0, // string id for title of experiment
473 0, // string id for description of experiment 473 0, // string id for description of experiment
474 0, // supported platforms 474 0, // supported platforms
475 about_flags::FeatureEntry::ENABLE_DISABLE_VALUE, 475 flags_ui::FeatureEntry::ENABLE_DISABLE_VALUE,
476 switches::kEnableNewProfileManagement, 476 switches::kEnableNewProfileManagement,
477 "", // not used with ENABLE_DISABLE_VALUE type 477 "", // not used with ENABLE_DISABLE_VALUE type
478 switches::kDisableNewProfileManagement, 478 switches::kDisableNewProfileManagement,
479 "", // not used with ENABLE_DISABLE_VALUE type 479 "", // not used with ENABLE_DISABLE_VALUE type
480 nullptr, // not used with ENABLE_DISABLE_VALUE type 480 nullptr, // not used with ENABLE_DISABLE_VALUE type
481 nullptr, // not used with ENABLE_DISABLE_VALUE type 481 nullptr, // not used with ENABLE_DISABLE_VALUE type
482 3}; 482 3};
483 flags_ui::PrefServiceFlagsStorage flags_storage( 483 flags_ui::PrefServiceFlagsStorage flags_storage(
484 g_browser_process->local_state()); 484 g_browser_process->local_state());
485 about_flags::SetFeatureEntryEnabled(&flags_storage, entry.NameForChoice(1), 485 about_flags::SetFeatureEntryEnabled(&flags_storage, entry.NameForChoice(1),
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 PrefService* local_state = g_browser_process->local_state(); 555 PrefService* local_state = g_browser_process->local_state();
556 const bool dismissed = local_state->GetBoolean( 556 const bool dismissed = local_state->GetBoolean(
557 prefs::kProfileAvatarRightClickTutorialDismissed); 557 prefs::kProfileAvatarRightClickTutorialDismissed);
558 558
559 // Don't show the tutorial if it's already been dismissed or if right-clicking 559 // Don't show the tutorial if it's already been dismissed or if right-clicking
560 // wouldn't show any targets. 560 // wouldn't show any targets.
561 return !dismissed && HasProfileSwitchTargets(profile); 561 return !dismissed && HasProfileSwitchTargets(profile);
562 } 562 }
563 563
564 } // namespace profiles 564 } // namespace profiles
OLDNEW
« no previous file with comments | « chrome/browser/about_flags_unittest.cc ('k') | components/flags_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698