OLD | NEW |
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 #include "blimp/client/core/session/identity_source.h" | 5 #include "blimp/client/core/session/identity_source.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "blimp/client/core/blimp_client_switches.h" | 9 #include "blimp/client/core/switches/blimp_client_switches.h" |
10 | 10 |
11 namespace blimp { | 11 namespace blimp { |
12 namespace client { | 12 namespace client { |
13 | 13 |
14 namespace { | 14 namespace { |
15 // OAuth2 token scope. | 15 // OAuth2 token scope. |
16 const char kOAuth2TokenScope[] = | 16 const char kOAuth2TokenScope[] = |
17 "https://www.googleapis.com/auth/userinfo.email"; | 17 "https://www.googleapis.com/auth/userinfo.email"; |
18 | 18 |
19 // Max retry times when OAuth2 token request is canceled. | 19 // Max retry times when OAuth2 token request is canceled. |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 OAuth2TokenService::ScopeSet scopes; | 138 OAuth2TokenService::ScopeSet scopes; |
139 scopes.insert(kOAuth2TokenScope); | 139 scopes.insert(kOAuth2TokenScope); |
140 token_request_ = token_service->StartRequest(account_id_, scopes, this); | 140 token_request_ = token_service->StartRequest(account_id_, scopes, this); |
141 } else { | 141 } else { |
142 identity_provider_->AddActiveAccountRefreshTokenObserver(this); | 142 identity_provider_->AddActiveAccountRefreshTokenObserver(this); |
143 } | 143 } |
144 } | 144 } |
145 | 145 |
146 } // namespace client | 146 } // namespace client |
147 } // namespace blimp | 147 } // namespace blimp |
OLD | NEW |