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/webstore_standalone_installer.h" | 5 #include "chrome/browser/extensions/webstore_standalone_installer.h" |
6 | 6 |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 #include "chrome/browser/extensions/crx_installer.h" | 8 #include "chrome/browser/extensions/crx_installer.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_install_ui.h" | 10 #include "chrome/browser/extensions/extension_install_ui.h" |
11 #include "chrome/browser/extensions/extension_service.h" | 11 #include "chrome/browser/extensions/extension_service.h" |
12 #include "chrome/browser/extensions/extension_system.h" | 12 #include "chrome/browser/extensions/extension_system.h" |
13 #include "chrome/browser/extensions/webstore_data_fetcher.h" | 13 #include "chrome/browser/extensions/webstore_data_fetcher.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
16 #include "extensions/browser/extension_prefs.h" | 16 #include "extensions/browser/extension_prefs.h" |
17 #include "extensions/common/extension.h" | 17 #include "extensions/common/extension.h" |
18 #include "url/gurl.h" | 18 #include "url/gurl.h" |
19 | 19 |
20 using content::WebContents; | 20 using content::WebContents; |
21 | 21 |
22 namespace extensions { | 22 namespace extensions { |
23 | 23 |
24 const char kManifestKey[] = "manifest"; | |
25 const char kIconUrlKey[] = "icon_url"; | |
26 const char kLocalizedNameKey[] = "localized_name"; | |
27 const char kLocalizedDescriptionKey[] = "localized_description"; | |
28 const char kUsersKey[] = "users"; | |
29 const char kShowUserCountKey[] = "show_user_count"; | |
30 const char kAverageRatingKey[] = "average_rating"; | |
31 const char kRatingCountKey[] = "rating_count"; | |
32 | |
33 const char kInvalidWebstoreItemId[] = "Invalid Chrome Web Store item ID"; | 24 const char kInvalidWebstoreItemId[] = "Invalid Chrome Web Store item ID"; |
34 const char kWebstoreRequestError[] = | 25 const char kWebstoreRequestError[] = |
35 "Could not fetch data from the Chrome Web Store"; | 26 "Could not fetch data from the Chrome Web Store"; |
36 const char kInvalidWebstoreResponseError[] = "Invalid Chrome Web Store reponse"; | 27 const char kInvalidWebstoreResponseError[] = "Invalid Chrome Web Store reponse"; |
37 const char kInvalidManifestError[] = "Invalid manifest"; | 28 const char kInvalidManifestError[] = "Invalid manifest"; |
38 const char kUserCancelledError[] = "User cancelled install"; | 29 const char kUserCancelledError[] = "User cancelled install"; |
39 const char kExtensionIsBlacklisted[] = "Extension is blacklisted"; | 30 const char kExtensionIsBlacklisted[] = "Extension is blacklisted"; |
40 | 31 |
41 WebstoreStandaloneInstaller::WebstoreStandaloneInstaller( | 32 WebstoreStandaloneInstaller::WebstoreStandaloneInstaller( |
42 const std::string& webstore_item_id, | 33 const std::string& webstore_item_id, |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 // Balanced in InstallUIAbort or indirectly in InstallUIProceed via | 321 // Balanced in InstallUIAbort or indirectly in InstallUIProceed via |
331 // OnExtensionInstallSuccess or OnExtensionInstallFailure. | 322 // OnExtensionInstallSuccess or OnExtensionInstallFailure. |
332 AddRef(); | 323 AddRef(); |
333 | 324 |
334 install_ui_ = CreateInstallUI(); | 325 install_ui_ = CreateInstallUI(); |
335 install_ui_->ConfirmStandaloneInstall( | 326 install_ui_->ConfirmStandaloneInstall( |
336 this, localized_extension_for_display_.get(), &icon_, *install_prompt_); | 327 this, localized_extension_for_display_.get(), &icon_, *install_prompt_); |
337 } | 328 } |
338 | 329 |
339 } // namespace extensions | 330 } // namespace extensions |
OLD | NEW |