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

Side by Side Diff: components/proximity_auth/proximity_auth_client.h

Issue 1209193003: [Proximity Auth] Create one ProximityAuthClient per profile, rather than one global one. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable tests on non-ChromeOS, since there's nothing left to test on the other platforms Created 5 years, 5 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 COMPONENTS_PROXIMITY_AUTH_CLIENT_H_ 5 #ifndef COMPONENTS_PROXIMITY_AUTH_CLIENT_H_
6 #define COMPONENTS_PROXIMITY_AUTH_CLIENT_H_ 6 #define COMPONENTS_PROXIMITY_AUTH_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h"
11
12 namespace content {
13 class BrowserContext;
14 } // namespace content
15
16 namespace proximity_auth { 10 namespace proximity_auth {
17 11
18 // An interface that needs to be supplied to the Proximity Auth component by its 12 // An interface that needs to be supplied to the Proximity Auth component by its
19 // embedder. 13 // embedder. There should be one |ProximityAuthClient| per
14 // |content::BrowserContext|.
20 class ProximityAuthClient { 15 class ProximityAuthClient {
21 public: 16 public:
22 // Returns the authenticated username for |browser_context|.
23 virtual std::string GetAuthenticatedUsername(
24 content::BrowserContext* browser_context) const = 0;
25
26 // Locks the screen for |browser_context|.
27 virtual void Lock(content::BrowserContext* browser_context) = 0;
28
29 protected:
30 ProximityAuthClient() {}
31 virtual ~ProximityAuthClient() {} 17 virtual ~ProximityAuthClient() {}
32 18
33 private: 19 // Returns the authenticated username.
34 DISALLOW_COPY_AND_ASSIGN(ProximityAuthClient); 20 virtual std::string GetAuthenticatedUsername() const = 0;
35 }; 21 };
36 22
37 } // namespace proximity_auth 23 } // namespace proximity_auth
38 24
39 #endif // COMPONENTS_PROXIMITY_AUTH_CLIENT_H_ 25 #endif // COMPONENTS_PROXIMITY_AUTH_CLIENT_H_
OLDNEW
« no previous file with comments | « components/proximity_auth/ble/proximity_auth_ble_system_unittest.cc ('k') | components/proximity_auth/screenlock_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698