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/convert_web_app.h" | 5 #include "chrome/browser/extensions/convert_web_app.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <limits> | 8 #include <limits> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 return NULL; | 164 return NULL; |
165 } | 165 } |
166 } | 166 } |
167 | 167 |
168 // Finally, create the extension object to represent the unpacked directory. | 168 // Finally, create the extension object to represent the unpacked directory. |
169 std::string error; | 169 std::string error; |
170 scoped_refptr<Extension> extension = Extension::Create( | 170 scoped_refptr<Extension> extension = Extension::Create( |
171 temp_dir.path(), | 171 temp_dir.path(), |
172 Extension::INTERNAL, | 172 Extension::INTERNAL, |
173 *root, | 173 *root, |
174 false, // Don't require a key. | 174 Extension::STRICT_ERROR_CHECKS, |
175 true, // Enable strict error checks. | |
176 &error); | 175 &error); |
177 if (!extension) { | 176 if (!extension) { |
178 LOG(ERROR) << error; | 177 LOG(ERROR) << error; |
179 return NULL; | 178 return NULL; |
180 } | 179 } |
181 | 180 |
182 temp_dir.Take(); // The caller takes ownership of the directory. | 181 temp_dir.Take(); // The caller takes ownership of the directory. |
183 return extension; | 182 return extension; |
184 } | 183 } |
OLD | NEW |