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/sandboxed_extension_unpacker.h" | 5 #include "chrome/browser/extensions/sandboxed_extension_unpacker.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "chrome/common/extensions/extension_l10n_util.h" | 26 #include "chrome/common/extensions/extension_l10n_util.h" |
27 #include "chrome/common/extensions/extension_unpacker.h" | 27 #include "chrome/common/extensions/extension_unpacker.h" |
28 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 28 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
29 #include "content/public/browser/browser_thread.h" | 29 #include "content/public/browser/browser_thread.h" |
30 #include "crypto/signature_verifier.h" | 30 #include "crypto/signature_verifier.h" |
31 #include "grit/generated_resources.h" | 31 #include "grit/generated_resources.h" |
32 #include "third_party/skia/include/core/SkBitmap.h" | 32 #include "third_party/skia/include/core/SkBitmap.h" |
33 #include "ui/base/l10n/l10n_util.h" | 33 #include "ui/base/l10n/l10n_util.h" |
34 #include "ui/gfx/codec/png_codec.h" | 34 #include "ui/gfx/codec/png_codec.h" |
35 | 35 |
| 36 using content::BrowserThread; |
| 37 |
36 // The following macro makes histograms that record the length of paths | 38 // The following macro makes histograms that record the length of paths |
37 // in this file much easier to read. | 39 // in this file much easier to read. |
38 // Windows has a short max path length. If the path length to a | 40 // Windows has a short max path length. If the path length to a |
39 // file being unpacked from a CRX exceeds the max length, we might | 41 // file being unpacked from a CRX exceeds the max length, we might |
40 // fail to install. To see if this is happening, see how long the | 42 // fail to install. To see if this is happening, see how long the |
41 // path to the temp unpack directory is. See crbug.com/69693 . | 43 // path to the temp unpack directory is. See crbug.com/69693 . |
42 #define PATH_LENGTH_HISTOGRAM(name, path) \ | 44 #define PATH_LENGTH_HISTOGRAM(name, path) \ |
43 UMA_HISTOGRAM_CUSTOM_COUNTS(name, path.value().length(), 0, 500, 100) | 45 UMA_HISTOGRAM_CUSTOM_COUNTS(name, path.value().length(), 0, 500, 100) |
44 | 46 |
45 // Record a rate (kB per second) at which extensions are unpacked. | 47 // Record a rate (kB per second) at which extensions are unpacked. |
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 ERROR_SAVING_CATALOG, | 711 ERROR_SAVING_CATALOG, |
710 l10n_util::GetStringFUTF8( | 712 l10n_util::GetStringFUTF8( |
711 IDS_EXTENSION_PACKAGE_INSTALL_ERROR, | 713 IDS_EXTENSION_PACKAGE_INSTALL_ERROR, |
712 ASCIIToUTF16("ERROR_SAVING_CATALOG"))); | 714 ASCIIToUTF16("ERROR_SAVING_CATALOG"))); |
713 return false; | 715 return false; |
714 } | 716 } |
715 } | 717 } |
716 | 718 |
717 return true; | 719 return true; |
718 } | 720 } |
OLD | NEW |