OLD | NEW |
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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/metrics/histogram.h" | 6 #include "base/metrics/histogram.h" |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
9 #include "chrome/browser/chromeos/first_run/first_run_controller.h" | 9 #include "chrome/browser/chromeos/first_run/first_run_controller.h" |
10 #include "chrome/browser/chromeos/login/users/user_manager.h" | 10 #include "chrome/browser/chromeos/login/users/user_manager.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 chrome::NOTIFICATION_SESSION_STARTED, | 54 chrome::NOTIFICATION_SESSION_STARTED, |
55 content::NotificationService::AllSources()); | 55 content::NotificationService::AllSources()); |
56 } | 56 } |
57 | 57 |
58 virtual ~DialogLauncher() {} | 58 virtual ~DialogLauncher() {} |
59 | 59 |
60 virtual void Observe(int type, | 60 virtual void Observe(int type, |
61 const content::NotificationSource& source, | 61 const content::NotificationSource& source, |
62 const content::NotificationDetails& details) OVERRIDE { | 62 const content::NotificationDetails& details) OVERRIDE { |
63 DCHECK(type == chrome::NOTIFICATION_SESSION_STARTED); | 63 DCHECK(type == chrome::NOTIFICATION_SESSION_STARTED); |
64 DCHECK(content::Details<const User>(details).ptr() == | 64 DCHECK(content::Details<const user_manager::User>(details).ptr() == |
65 ProfileHelper::Get()->GetUserByProfile(profile_)); | 65 ProfileHelper::Get()->GetUserByProfile(profile_)); |
66 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 66 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
67 bool launched_in_test = command_line->HasSwitch(::switches::kTestType); | 67 bool launched_in_test = command_line->HasSwitch(::switches::kTestType); |
68 bool launched_in_telemetry = | 68 bool launched_in_telemetry = |
69 command_line->HasSwitch(switches::kOobeSkipPostLogin); | 69 command_line->HasSwitch(switches::kOobeSkipPostLogin); |
70 bool is_user_new = chromeos::UserManager::Get()->IsCurrentUserNew(); | 70 bool is_user_new = chromeos::UserManager::Get()->IsCurrentUserNew(); |
71 bool first_run_forced = command_line->HasSwitch(switches::kForceFirstRunUI); | 71 bool first_run_forced = command_line->HasSwitch(switches::kForceFirstRunUI); |
72 bool first_run_seen = | 72 bool first_run_seen = |
73 profile_->GetPrefs()->GetBoolean(prefs::kFirstRunTutorialShown); | 73 profile_->GetPrefs()->GetBoolean(prefs::kFirstRunTutorialShown); |
74 if (!launched_in_telemetry && | 74 if (!launched_in_telemetry && |
(...skipping 26 matching lines...) Expand all Loading... |
101 ProfileHelper::Get()->GetProfileByUser(user_manager->GetActiveUser())); | 101 ProfileHelper::Get()->GetProfileByUser(user_manager->GetActiveUser())); |
102 } | 102 } |
103 | 103 |
104 void LaunchTutorial() { | 104 void LaunchTutorial() { |
105 UMA_HISTOGRAM_BOOLEAN("CrosFirstRun.TutorialLaunched", true); | 105 UMA_HISTOGRAM_BOOLEAN("CrosFirstRun.TutorialLaunched", true); |
106 FirstRunController::Start(); | 106 FirstRunController::Start(); |
107 } | 107 } |
108 | 108 |
109 } // namespace first_run | 109 } // namespace first_run |
110 } // namespace chromeos | 110 } // namespace chromeos |
OLD | NEW |