OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/crx_installer.h" | 5 #include "chrome/browser/extensions/crx_installer.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/resource_bundle.h" | |
11 #include "base/file_util.h" | 10 #include "base/file_util.h" |
12 #include "base/lazy_instance.h" | 11 #include "base/lazy_instance.h" |
13 #include "base/path_service.h" | 12 #include "base/path_service.h" |
14 #include "base/scoped_temp_dir.h" | 13 #include "base/scoped_temp_dir.h" |
15 #include "base/stl_util-inl.h" | 14 #include "base/stl_util-inl.h" |
16 #include "base/stringprintf.h" | 15 #include "base/stringprintf.h" |
17 #include "base/time.h" | 16 #include "base/time.h" |
18 #include "base/task.h" | 17 #include "base/task.h" |
19 #include "base/threading/thread_restrictions.h" | 18 #include "base/threading/thread_restrictions.h" |
20 #include "base/utf_string_conversions.h" | 19 #include "base/utf_string_conversions.h" |
21 #include "base/version.h" | 20 #include "base/version.h" |
22 #include "chrome/browser/browser_process.h" | 21 #include "chrome/browser/browser_process.h" |
23 #include "chrome/browser/browser_thread.h" | 22 #include "chrome/browser/browser_thread.h" |
24 #include "chrome/browser/extensions/convert_user_script.h" | 23 #include "chrome/browser/extensions/convert_user_script.h" |
25 #include "chrome/browser/extensions/convert_web_app.h" | 24 #include "chrome/browser/extensions/convert_web_app.h" |
26 #include "chrome/browser/extensions/extension_service.h" | 25 #include "chrome/browser/extensions/extension_service.h" |
27 #include "chrome/browser/extensions/extension_error_reporter.h" | 26 #include "chrome/browser/extensions/extension_error_reporter.h" |
28 #include "chrome/browser/shell_integration.h" | 27 #include "chrome/browser/shell_integration.h" |
29 #include "chrome/browser/web_applications/web_app.h" | 28 #include "chrome/browser/web_applications/web_app.h" |
30 #include "chrome/common/chrome_paths.h" | 29 #include "chrome/common/chrome_paths.h" |
31 #include "chrome/common/extensions/extension_file_util.h" | 30 #include "chrome/common/extensions/extension_file_util.h" |
32 #include "chrome/common/extensions/extension_constants.h" | 31 #include "chrome/common/extensions/extension_constants.h" |
33 #include "chrome/common/notification_service.h" | 32 #include "chrome/common/notification_service.h" |
34 #include "chrome/common/notification_type.h" | 33 #include "chrome/common/notification_type.h" |
35 #include "grit/chromium_strings.h" | 34 #include "grit/chromium_strings.h" |
36 #include "grit/generated_resources.h" | 35 #include "grit/generated_resources.h" |
37 #include "grit/theme_resources.h" | 36 #include "grit/theme_resources.h" |
38 #include "third_party/skia/include/core/SkBitmap.h" | 37 #include "third_party/skia/include/core/SkBitmap.h" |
| 38 #include "ui/base/resource/resource_bundle.h" |
39 | 39 |
40 namespace { | 40 namespace { |
41 | 41 |
42 // Helper function to delete files. This is used to avoid ugly casts which | 42 // Helper function to delete files. This is used to avoid ugly casts which |
43 // would be necessary with PostMessage since file_util::Delete is overloaded. | 43 // would be necessary with PostMessage since file_util::Delete is overloaded. |
44 static void DeleteFileHelper(const FilePath& path, bool recursive) { | 44 static void DeleteFileHelper(const FilePath& path, bool recursive) { |
45 file_util::Delete(path, recursive); | 45 file_util::Delete(path, recursive); |
46 } | 46 } |
47 | 47 |
48 struct WhitelistedInstallData { | 48 struct WhitelistedInstallData { |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 client_->OnInstallSuccess(extension_.get(), install_icon_.get()); | 425 client_->OnInstallSuccess(extension_.get(), install_icon_.get()); |
426 | 426 |
427 // Tell the frontend about the installation and hand off ownership of | 427 // Tell the frontend about the installation and hand off ownership of |
428 // extension_ to it. | 428 // extension_ to it. |
429 frontend_->OnExtensionInstalled(extension_); | 429 frontend_->OnExtensionInstalled(extension_); |
430 extension_ = NULL; | 430 extension_ = NULL; |
431 | 431 |
432 // We're done. We don't post any more tasks to ourselves so we are deleted | 432 // We're done. We don't post any more tasks to ourselves so we are deleted |
433 // soon. | 433 // soon. |
434 } | 434 } |
OLD | NEW |