Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1610)

Side by Side Diff: chrome/common/extensions/extension.cc

Issue 159345: Implement mimetype sniffing for extensions. (Closed)
Patch Set: rebase Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/common/extensions/extension.h ('k') | chrome/common/extensions/extension_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/common/extensions/extension.h" 5 #include "chrome/common/extensions/extension.h"
6 6
7 #include "app/resource_bundle.h" 7 #include "app/resource_bundle.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 }; 67 };
68 68
69 #if defined(OS_WIN) 69 #if defined(OS_WIN)
70 const char* Extension::kExtensionRegistryPath = 70 const char* Extension::kExtensionRegistryPath =
71 "Software\\Google\\Chrome\\Extensions"; 71 "Software\\Google\\Chrome\\Extensions";
72 #endif 72 #endif
73 73
74 // first 16 bytes of SHA256 hashed public key. 74 // first 16 bytes of SHA256 hashed public key.
75 const size_t Extension::kIdSize = 16; 75 const size_t Extension::kIdSize = 16;
76 76
77 const char Extension::kMimeType[] = "application/x-chrome-extension";
78
77 const int Extension::kKnownIconSizes[] = { 128 }; 79 const int Extension::kKnownIconSizes[] = { 128 };
78 80
79 Extension::~Extension() { 81 Extension::~Extension() {
80 for (PageActionMap::iterator i = page_actions_.begin(); 82 for (PageActionMap::iterator i = page_actions_.begin();
81 i != page_actions_.end(); ++i) 83 i != page_actions_.end(); ++i)
82 delete i->second; 84 delete i->second;
83 } 85 }
84 86
85 const std::string Extension::VersionString() const { 87 const std::string Extension::VersionString() const {
86 return version_->GetString(); 88 return version_->GetString();
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 it != page_actions().end(); ++it) { 876 it != page_actions().end(); ++it) {
875 const std::vector<FilePath>& icon_paths = it->second->icon_paths(); 877 const std::vector<FilePath>& icon_paths = it->second->icon_paths();
876 for (std::vector<FilePath>::const_iterator iter = icon_paths.begin(); 878 for (std::vector<FilePath>::const_iterator iter = icon_paths.begin();
877 iter != icon_paths.end(); ++iter) { 879 iter != icon_paths.end(); ++iter) {
878 image_paths.insert(*iter); 880 image_paths.insert(*iter);
879 } 881 }
880 } 882 }
881 883
882 return image_paths; 884 return image_paths;
883 } 885 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension.h ('k') | chrome/common/extensions/extension_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698