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

Side by Side Diff: components/signin/core/browser/account_service_flag_fetcher.h

Issue 566933005: Do not display lock for hosted domains (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_SERVICE_FLAG_FETCHER_H_ 5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_SERVICE_FLAG_FETCHER_H_
6 #define COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_SERVICE_FLAG_FETCHER_H_ 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_SERVICE_FLAG_FETCHER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 18 matching lines...) Expand all
29 public OAuth2TokenService::Observer, 29 public OAuth2TokenService::Observer,
30 public OAuth2TokenService::Consumer { 30 public OAuth2TokenService::Consumer {
31 public: 31 public:
32 enum ResultCode { 32 enum ResultCode {
33 SUCCESS, 33 SUCCESS,
34 TOKEN_ERROR, // Failed to get OAuth2 token. 34 TOKEN_ERROR, // Failed to get OAuth2 token.
35 SERVICE_ERROR, // Service returned an error or malformed reply. 35 SERVICE_ERROR, // Service returned an error or malformed reply.
36 }; 36 };
37 37
38 // If the flag download is successful, this will return the list of service 38 // If the flag download is successful, this will return the list of service
39 // flags that are set for the given account. 39 // flags that are set for the given account and the account's hosted
40 // domain.
40 typedef base::Callback<void(ResultCode /* result */, 41 typedef base::Callback<void(ResultCode /* result */,
41 const std::vector<std::string>& /* flags */)> 42 const std::vector<std::string>& /* flags */)>
42 ResultCallback; 43 ResultCallback;
43 44
44 // Immediately starts fetching the flags. 45 // Immediately starts fetching the flags.
45 AccountServiceFlagFetcher(const std::string& account_id, 46 AccountServiceFlagFetcher(const std::string& account_id,
46 ProfileOAuth2TokenService* token_service, 47 ProfileOAuth2TokenService* token_service,
47 net::URLRequestContextGetter* request_context, 48 net::URLRequestContextGetter* request_context,
48 const ResultCallback& callback); 49 const ResultCallback& callback);
49 50
(...skipping 28 matching lines...) Expand all
78 GaiaAuthFetcher gaia_auth_fetcher_; 79 GaiaAuthFetcher gaia_auth_fetcher_;
79 80
80 ResultCallback callback_; 81 ResultCallback callback_;
81 82
82 scoped_ptr<OAuth2TokenService::Request> oauth2_access_token_request_; 83 scoped_ptr<OAuth2TokenService::Request> oauth2_access_token_request_;
83 84
84 DISALLOW_COPY_AND_ASSIGN(AccountServiceFlagFetcher); 85 DISALLOW_COPY_AND_ASSIGN(AccountServiceFlagFetcher);
85 }; 86 };
86 87
87 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_SERVICE_FLAG_FETCHER_H_ 88 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_SERVICE_FLAG_FETCHER_H_
OLDNEW
« chrome/browser/ui/views/profiles/profile_chooser_view.cc ('K') | « chrome/common/pref_names.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698