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

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

Issue 160243: Merge 21612 - Implement mimetype sniffing for extensions.... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: 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 | Annotate | Revision Log
« 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')
Property Changes:
Modified: svn:mergeinfo
Merged /trunk/src/chrome/common/extensions/extension.cc:r21612
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 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 it != page_actions().end(); ++it) { 879 it != page_actions().end(); ++it) {
878 const std::vector<FilePath>& icon_paths = it->second->icon_paths(); 880 const std::vector<FilePath>& icon_paths = it->second->icon_paths();
879 for (std::vector<FilePath>::const_iterator iter = icon_paths.begin(); 881 for (std::vector<FilePath>::const_iterator iter = icon_paths.begin();
880 iter != icon_paths.end(); ++iter) { 882 iter != icon_paths.end(); ++iter) {
881 image_paths.insert(*iter); 883 image_paths.insert(*iter);
882 } 884 }
883 } 885 }
884 886
885 return image_paths; 887 return image_paths;
886 } 888 }
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