OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/extensions/api/identity/identity_api.h" | 5 #include "chrome/browser/extensions/api/identity/identity_api.h" |
6 | 6 |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 #include "chrome/common/extensions/api/experimental_identity.h" | 8 #include "chrome/browser/extensions/extension_function_dispatcher.h" |
9 #include "chrome/browser/extensions/extension_install_prompt.h" | 9 #include "chrome/browser/extensions/extension_install_prompt.h" |
10 #include "chrome/browser/extensions/extension_function_dispatcher.h" | |
11 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
12 #include "chrome/browser/extensions/permissions_updater.h" | 11 #include "chrome/browser/extensions/permissions_updater.h" |
13 #include "chrome/browser/signin/token_service.h" | 12 #include "chrome/browser/signin/token_service.h" |
14 #include "chrome/browser/signin/token_service_factory.h" | 13 #include "chrome/browser/signin/token_service_factory.h" |
15 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
16 #include "chrome/browser/ui/browser_navigator.h" | 15 #include "chrome/browser/ui/browser_navigator.h" |
17 #include "chrome/browser/ui/webui/signin/login_ui_service.h" | 16 #include "chrome/browser/ui/webui/signin/login_ui_service.h" |
18 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" | 17 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" |
19 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h" | 18 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h" |
| 19 #include "chrome/common/extensions/api/experimental_identity.h" |
20 #include "chrome/common/extensions/extension.h" | 20 #include "chrome/common/extensions/extension.h" |
21 #include "chrome/common/url_constants.h" | 21 #include "chrome/common/url_constants.h" |
22 #include "content/public/common/page_transition_types.h" | 22 #include "content/public/common/page_transition_types.h" |
23 #include "googleurl/src/gurl.h" | 23 #include "googleurl/src/gurl.h" |
24 #include "webkit/glue/window_open_disposition.h" | 24 #include "ui/base/window_open_disposition.h" |
25 | 25 |
26 namespace extensions { | 26 namespace extensions { |
27 | 27 |
28 namespace identity_constants { | 28 namespace identity_constants { |
29 const char kInvalidClientId[] = "Invalid OAuth2 Client ID."; | 29 const char kInvalidClientId[] = "Invalid OAuth2 Client ID."; |
30 const char kInvalidScopes[] = "Invalid OAuth2 scopes."; | 30 const char kInvalidScopes[] = "Invalid OAuth2 scopes."; |
31 const char kAuthFailure[] = "OAuth2 request failed: "; | 31 const char kAuthFailure[] = "OAuth2 request failed: "; |
32 const char kNoGrant[] = "OAuth2 not granted or revoked."; | 32 const char kNoGrant[] = "OAuth2 not granted or revoked."; |
33 const char kUserRejected[] = "The user did not approve access."; | 33 const char kUserRejected[] = "The user did not approve access."; |
34 const char kUserNotSignedIn[] = "The user is not signed in."; | 34 const char kUserNotSignedIn[] = "The user is not signed in."; |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 Release(); // Balanced in RunImpl. | 246 Release(); // Balanced in RunImpl. |
247 } | 247 } |
248 | 248 |
249 void IdentityLaunchWebAuthFlowFunction::OnAuthFlowFailure() { | 249 void IdentityLaunchWebAuthFlowFunction::OnAuthFlowFailure() { |
250 error_ = identity_constants::kInvalidRedirect; | 250 error_ = identity_constants::kInvalidRedirect; |
251 SendResponse(false); | 251 SendResponse(false); |
252 Release(); // Balanced in RunImpl. | 252 Release(); // Balanced in RunImpl. |
253 } | 253 } |
254 | 254 |
255 } // namespace extensions | 255 } // namespace extensions |
OLD | NEW |