| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/extension_webstore_private_api.h" | 5 #include "chrome/browser/extensions/extension_webstore_private_api.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| 11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
| 12 #include "base/values.h" | 12 #include "base/values.h" |
| 13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
| 14 #include "chrome/browser/extensions/crx_installer.h" | 14 #include "chrome/browser/extensions/crx_installer.h" |
| 15 #include "chrome/browser/extensions/extension_prefs.h" | 15 #include "chrome/browser/extensions/extension_prefs.h" |
| 16 #include "chrome/browser/extensions/extension_service.h" | 16 #include "chrome/browser/extensions/extension_service.h" |
| 17 #include "chrome/browser/net/gaia/token_service.h" | 17 #include "chrome/browser/net/gaia/token_service.h" |
| 18 #include "chrome/browser/profiles/profile_manager.h" | 18 #include "chrome/browser/profiles/profile_manager.h" |
| 19 #include "chrome/browser/sync/profile_sync_service.h" | 19 #include "chrome/browser/sync/profile_sync_service.h" |
| 20 #include "chrome/browser/tab_contents/tab_contents.h" | 20 #include "chrome/browser/tab_contents/tab_contents.h" |
| 21 #include "chrome/common/chrome_switches.h" | 21 #include "chrome/common/chrome_switches.h" |
| 22 #include "chrome/common/extensions/extension_constants.h" | 22 #include "chrome/common/extensions/extension_constants.h" |
| 23 #include "chrome/common/extensions/extension_error_utils.h" | 23 #include "chrome/common/extensions/extension_error_utils.h" |
| 24 #include "chrome/common/net/gaia/gaia_constants.h" | 24 #include "chrome/common/net/gaia/gaia_constants.h" |
| 25 #include "chrome/common/notification_service.h" | 25 #include "chrome/common/notification_details.h" |
| 26 #include "chrome/common/notification_source.h" |
| 26 #include "chrome/common/notification_type.h" | 27 #include "chrome/common/notification_type.h" |
| 27 #include "grit/chromium_strings.h" | 28 #include "grit/chromium_strings.h" |
| 28 #include "grit/generated_resources.h" | 29 #include "grit/generated_resources.h" |
| 29 #include "net/base/escape.h" | 30 #include "net/base/escape.h" |
| 30 | 31 |
| 31 namespace { | 32 namespace { |
| 32 | 33 |
| 33 const char kLoginKey[] = "login"; | 34 const char kLoginKey[] = "login"; |
| 34 const char kTokenKey[] = "token"; | 35 const char kTokenKey[] = "token"; |
| 35 const char kInvalidIdError[] = "Invalid id"; | 36 const char kInvalidIdError[] = "Invalid id"; |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 } | 316 } |
| 316 | 317 |
| 317 DCHECK(waiting_for_token_); | 318 DCHECK(waiting_for_token_); |
| 318 | 319 |
| 319 result_.reset(CreateLoginResult(GetDefaultProfile(profile_))); | 320 result_.reset(CreateLoginResult(GetDefaultProfile(profile_))); |
| 320 SendResponse(true); | 321 SendResponse(true); |
| 321 | 322 |
| 322 // Matches the AddRef in RunImpl(). | 323 // Matches the AddRef in RunImpl(). |
| 323 Release(); | 324 Release(); |
| 324 } | 325 } |
| OLD | NEW |