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

Side by Side Diff: blimp/client/core/session/identity_source.h

Issue 2403913003: Add user name in the feedback data. (Closed)
Patch Set: Version check only in Java layer. Created 4 years, 1 month 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 BLIMP_CLIENT_CORE_SESSION_IDENTITY_SOURCE_H_ 5 #ifndef BLIMP_CLIENT_CORE_SESSION_IDENTITY_SOURCE_H_
6 #define BLIMP_CLIENT_CORE_SESSION_IDENTITY_SOURCE_H_ 6 #define BLIMP_CLIENT_CORE_SESSION_IDENTITY_SOURCE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 18 matching lines...) Expand all
29 29
30 explicit IdentitySource(std::unique_ptr<IdentityProvider> identity_provider, 30 explicit IdentitySource(std::unique_ptr<IdentityProvider> identity_provider,
31 const TokenErrorCallback& error_callback, 31 const TokenErrorCallback& error_callback,
32 const TokenCallback& callback); 32 const TokenCallback& callback);
33 ~IdentitySource() override; 33 ~IdentitySource() override;
34 34
35 // Start Blimp authentication by requesting OAuth2 token from Google. 35 // Start Blimp authentication by requesting OAuth2 token from Google.
36 // Duplicate connect calls during token fetching will be ignored. 36 // Duplicate connect calls during token fetching will be ignored.
37 void Connect(); 37 void Connect();
38 38
39 // Returns the account name for the current user.
nyquist 2016/11/08 20:58:59 Could you explain what happens if the user is not
40 std::string GetActiveUsername();
41
39 // Add sign in state observer. 42 // Add sign in state observer.
40 void AddObserver(IdentityProvider::Observer* observer); 43 void AddObserver(IdentityProvider::Observer* observer);
41 44
42 // Remove sign in state observer. 45 // Remove sign in state observer.
43 void RemoveObserver(IdentityProvider::Observer* observer); 46 void RemoveObserver(IdentityProvider::Observer* observer);
44 47
45 // OAuth2TokenService::Consumer implementation. 48 // OAuth2TokenService::Consumer implementation.
46 void OnGetTokenSuccess(const OAuth2TokenService::Request* request, 49 void OnGetTokenSuccess(const OAuth2TokenService::Request* request,
47 const std::string& access_token, 50 const std::string& access_token,
48 const base::Time& expiration_time) override; 51 const base::Time& expiration_time) override;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // Current retry count due to request cancellation. 84 // Current retry count due to request cancellation.
82 int retry_times_; 85 int retry_times_;
83 86
84 DISALLOW_COPY_AND_ASSIGN(IdentitySource); 87 DISALLOW_COPY_AND_ASSIGN(IdentitySource);
85 }; 88 };
86 89
87 } // namespace client 90 } // namespace client
88 } // namespace blimp 91 } // namespace blimp
89 92
90 #endif // BLIMP_CLIENT_CORE_SESSION_IDENTITY_SOURCE_H_ 93 #endif // BLIMP_CLIENT_CORE_SESSION_IDENTITY_SOURCE_H_
OLDNEW
« no previous file with comments | « blimp/client/core/feedback/blimp_feedback_data_unittest.cc ('k') | blimp/client/core/session/identity_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698