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

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

Issue 10750010: Add an installType property to the management API (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Forgot to remove param from LoadExtensionWithOptions (sorry) Created 8 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
OLDNEW
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/common/extensions/extension_file_util.h" 5 #include "chrome/common/extensions/extension_file_util.h"
6 6
7 #include <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 scoped_refptr<Extension> LoadExtension(const FilePath& extension_path, 134 scoped_refptr<Extension> LoadExtension(const FilePath& extension_path,
135 const std::string& extension_id, 135 const std::string& extension_id,
136 Extension::Location location, 136 Extension::Location location,
137 int flags, 137 int flags,
138 std::string* error) { 138 std::string* error) {
139 scoped_ptr<DictionaryValue> manifest(LoadManifest(extension_path, error)); 139 scoped_ptr<DictionaryValue> manifest(LoadManifest(extension_path, error));
140 if (!manifest.get()) 140 if (!manifest.get())
141 return NULL; 141 return NULL;
142 if (!extension_l10n_util::LocalizeExtension(extension_path, manifest.get(), 142 if (!extension_l10n_util::LocalizeExtension(extension_path, manifest.get(),
143 error)) 143 error)) {
144 return NULL; 144 return NULL;
145 }
145 146
146 scoped_refptr<Extension> extension(Extension::Create(extension_path, 147 scoped_refptr<Extension> extension(Extension::Create(extension_path,
147 location, 148 location,
148 *manifest, 149 *manifest,
149 flags, 150 flags,
150 extension_id, 151 extension_id,
151 error)); 152 error));
152 if (!extension.get()) 153 if (!extension.get())
153 return NULL; 154 return NULL;
154 155
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 return temp_path; 773 return temp_path;
773 774
774 return FilePath(); 775 return FilePath();
775 } 776 }
776 777
777 void DeleteFile(const FilePath& path, bool recursive) { 778 void DeleteFile(const FilePath& path, bool recursive) {
778 file_util::Delete(path, recursive); 779 file_util::Delete(path, recursive);
779 } 780 }
780 781
781 } // namespace extension_file_util 782 } // namespace extension_file_util
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension.cc ('k') | chrome/test/data/extensions/api_test/management/admin_extension/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698