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

Side by Side Diff: chrome/browser/chromeos/login/multi_profile_first_run_notification.cc

Issue 148093008: Create a dialog that warns about possible UI-oddities of the multi-profiles window teleport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Style fix Created 6 years, 10 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/login/multi_profile_first_run_notification.h" 5 #include "chrome/browser/chromeos/login/multi_profile_first_run_notification.h"
6 6
7 #include "ash/system/system_notifier.h" 7 #include "ash/system/system_notifier.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "chrome/browser/chromeos/login/user_manager.h" 10 #include "chrome/browser/chromeos/login/user_manager.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 void MultiProfileFirstRunNotification::RegisterProfilePrefs( 63 void MultiProfileFirstRunNotification::RegisterProfilePrefs(
64 user_prefs::PrefRegistrySyncable* registry) { 64 user_prefs::PrefRegistrySyncable* registry) {
65 registry->RegisterBooleanPref( 65 registry->RegisterBooleanPref(
66 prefs::kMultiProfileNotificationDismissed, 66 prefs::kMultiProfileNotificationDismissed,
67 false, 67 false,
68 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 68 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
69 registry->RegisterBooleanPref( 69 registry->RegisterBooleanPref(
70 prefs::kMultiProfileNeverShowIntro, 70 prefs::kMultiProfileNeverShowIntro,
71 false, 71 false,
72 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 72 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
73 registry->RegisterBooleanPref(
74 prefs::kMultiProfileWarningShowDismissed,
75 false,
76 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
73 } 77 }
74 78
75 void MultiProfileFirstRunNotification::UserProfilePrepared( 79 void MultiProfileFirstRunNotification::UserProfilePrepared(
76 Profile* user_profile) { 80 Profile* user_profile) {
77 if (!UserManager::IsMultipleProfilesAllowed() || 81 if (!UserManager::IsMultipleProfilesAllowed() ||
78 UserManager::Get()->GetLoggedInUsers().size() > 1 || 82 UserManager::Get()->GetLoggedInUsers().size() > 1 ||
79 user_profile->GetPrefs()->GetBoolean( 83 user_profile->GetPrefs()->GetBoolean(
80 prefs::kMultiProfileNotificationDismissed)) { 84 prefs::kMultiProfileNotificationDismissed)) {
81 return; 85 return;
82 } 86 }
(...skipping 19 matching lines...) Expand all
102 notification->SetSystemPriority(); 106 notification->SetSystemPriority();
103 message_center::MessageCenter::Get()->AddNotification(notification.Pass()); 107 message_center::MessageCenter::Get()->AddNotification(notification.Pass());
104 } 108 }
105 109
106 void MultiProfileFirstRunNotification::OnDismissed(Profile* user_profile) { 110 void MultiProfileFirstRunNotification::OnDismissed(Profile* user_profile) {
107 user_profile->GetPrefs()->SetBoolean( 111 user_profile->GetPrefs()->SetBoolean(
108 prefs::kMultiProfileNotificationDismissed, true); 112 prefs::kMultiProfileNotificationDismissed, true);
109 } 113 }
110 114
111 } // namespace chromeos 115 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698