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

Side by Side Diff: chrome/browser/signin/easy_unlock_screenlock_state_handler.h

Issue 935303002: [Smart Lock] Measure clicks on the lock icon during Easy Unlock's trial run. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SCREENLOCK_STATE_HANDLER_H_ 5 #ifndef CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SCREENLOCK_STATE_HANDLER_H_
6 #define CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SCREENLOCK_STATE_HANDLER_H_ 6 #define CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SCREENLOCK_STATE_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 // Updates the screenlock state. 91 // Updates the screenlock state.
92 void SetHardlockState(HardlockState new_state); 92 void SetHardlockState(HardlockState new_state);
93 93
94 // Shows the hardlock UI if the hardlock_state_ is not NO_HARDLOCK. 94 // Shows the hardlock UI if the hardlock_state_ is not NO_HARDLOCK.
95 void MaybeShowHardlockUI(); 95 void MaybeShowHardlockUI();
96 96
97 // Marks the current screenlock state as the one for trial Easy Unlock run. 97 // Marks the current screenlock state as the one for trial Easy Unlock run.
98 void SetTrialRun(); 98 void SetTrialRun();
99 99
100 // Records that the user clicked on the lock icon during the trial run
101 // initiated by the Easy Unlock app.
102 void RecordClickOnLockIcon();
103
100 State state() const { return state_; } 104 State state() const { return state_; }
101 105
102 private: 106 private:
103 // ScreenlockBridge::Observer: 107 // ScreenlockBridge::Observer:
104 void OnScreenDidLock( 108 void OnScreenDidLock(
105 ScreenlockBridge::LockHandler::ScreenType screen_type) override; 109 ScreenlockBridge::LockHandler::ScreenType screen_type) override;
106 void OnScreenDidUnlock( 110 void OnScreenDidUnlock(
107 ScreenlockBridge::LockHandler::ScreenType screen_type) override; 111 ScreenlockBridge::LockHandler::ScreenType screen_type) override;
108 void OnFocusedUserChanged(const std::string& user_id) override; 112 void OnFocusedUserChanged(const std::string& user_id) override;
109 113
110 // Forces refresh of the Easy Unlock screenlock UI. 114 // Forces refresh of the Easy Unlock screenlock UI.
111 void RefreshScreenlockState(); 115 void RefreshScreenlockState();
112 116
113 void ShowHardlockUI(); 117 void ShowHardlockUI();
114 118
115 // Updates icon's tooltip options. 119 // Updates icon's tooltip options.
116 // |trial_run|: Whether the trial Easy Unlock run is in progress.
117 void UpdateTooltipOptions( 120 void UpdateTooltipOptions(
118 bool trial_run,
119 ScreenlockBridge::UserPodCustomIconOptions* icon_options); 121 ScreenlockBridge::UserPodCustomIconOptions* icon_options);
120 122
121 // Gets the name to be used for the device. The name depends on the device 123 // Gets the name to be used for the device. The name depends on the device
122 // type (example values: Chromebook and Chromebox). 124 // type (example values: Chromebook and Chromebox).
123 base::string16 GetDeviceName(); 125 base::string16 GetDeviceName();
124 126
125 // Updates the screenlock auth type if it has to be changed. 127 // Updates the screenlock auth type if it has to be changed.
126 void UpdateScreenlockAuthType(); 128 void UpdateScreenlockAuthType();
127 129
128 State state_; 130 State state_;
129 std::string user_email_; 131 std::string user_email_;
130 ScreenlockBridge* screenlock_bridge_; 132 ScreenlockBridge* screenlock_bridge_;
131 133
132 // State of hardlock. 134 // State of hardlock.
133 HardlockState hardlock_state_; 135 HardlockState hardlock_state_;
134 bool hardlock_ui_shown_; 136 bool hardlock_ui_shown_;
135 137
136 // Whether this is the trial Easy Unlock run. If this is the case, a 138 // Whether this is the trial Easy Unlock run. If this is the case, a
137 // tutorial message should be shown and hard-locking be disabled. The trial 139 // tutorial message should be shown and hard-locking be disabled. The trial
138 // run should be set if the screen was locked by the Easy Unlock setup app. 140 // run should be set if the screen was locked by the Easy Unlock setup app.
139 bool is_trial_run_; 141 bool is_trial_run_;
140 142
141 DISALLOW_COPY_AND_ASSIGN(EasyUnlockScreenlockStateHandler); 143 DISALLOW_COPY_AND_ASSIGN(EasyUnlockScreenlockStateHandler);
142 }; 144 };
143 145
144 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SCREENLOCK_STATE_HANDLER_H_ 146 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SCREENLOCK_STATE_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/signin/easy_unlock_metrics.cc ('k') | chrome/browser/signin/easy_unlock_screenlock_state_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698