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

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

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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_APP_MANAGER_H_ 5 #ifndef CHROME_BROWSER_SIGNIN_EASY_UNLOCK_APP_MANAGER_H_
6 #define CHROME_BROWSER_SIGNIN_EASY_UNLOCK_APP_MANAGER_H_ 6 #define CHROME_BROWSER_SIGNIN_EASY_UNLOCK_APP_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 13
14 namespace extensions { 14 namespace extensions {
15 class ExtensionSystem; 15 class ExtensionSystem;
16 } 16 }
17 17
18 namespace user_manager {
19 class UserID;
20 }
21
18 // Used to manage Easy Unlock app's lifetime and to dispatch events to the app. 22 // Used to manage Easy Unlock app's lifetime and to dispatch events to the app.
19 // It's main purpose is to abstract extension system from the rest of easy 23 // It's main purpose is to abstract extension system from the rest of easy
20 // unlock code. 24 // unlock code.
21 class EasyUnlockAppManager { 25 class EasyUnlockAppManager {
22 public: 26 public:
23 virtual ~EasyUnlockAppManager(); 27 virtual ~EasyUnlockAppManager();
24 28
25 // Creates EasyUnlockAppManager object that should be used in production. 29 // Creates EasyUnlockAppManager object that should be used in production.
26 static scoped_ptr<EasyUnlockAppManager> Create( 30 static scoped_ptr<EasyUnlockAppManager> Create(
27 extensions::ExtensionSystem* extension_system, 31 extensions::ExtensionSystem* extension_system,
(...skipping 11 matching lines...) Expand all
39 // Loads Easy Unlock app. 43 // Loads Easy Unlock app.
40 virtual void LoadApp() = 0; 44 virtual void LoadApp() = 0;
41 45
42 // Disables Easy Unlock app. 46 // Disables Easy Unlock app.
43 virtual void DisableAppIfLoaded() = 0; 47 virtual void DisableAppIfLoaded() = 0;
44 48
45 // Reloads Easy Unlock app. 49 // Reloads Easy Unlock app.
46 virtual void ReloadApp() = 0; 50 virtual void ReloadApp() = 0;
47 51
48 // Sends easyUnlockPrivate.onUserInfoUpdate event to Easy Unlock app. 52 // Sends easyUnlockPrivate.onUserInfoUpdate event to Easy Unlock app.
49 virtual bool SendUserUpdatedEvent(const std::string& user_id, 53 virtual bool SendUserUpdatedEvent(const user_manager::UserID& user_id,
50 bool is_logged_in, 54 bool is_logged_in,
51 bool data_ready) = 0; 55 bool data_ready) = 0;
52 56
53 // Sends screenlockPrivate.onAuthAttempted event to Easy Unlock app. 57 // Sends screenlockPrivate.onAuthAttempted event to Easy Unlock app.
54 virtual bool SendAuthAttemptEvent() = 0; 58 virtual bool SendAuthAttemptEvent() = 0;
55 }; 59 };
56 60
57 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_APP_MANAGER_H_ 61 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_APP_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698