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

Side by Side Diff: chrome/browser/extensions/convert_user_script.cc

Issue 6766002: Replace bools in extension creation with flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For landing Created 9 years, 9 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
OLDNEW
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_user_script.h" 5 #include "chrome/browser/extensions/convert_user_script.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 if (!file_util::CopyFile(user_script_path, 143 if (!file_util::CopyFile(user_script_path,
144 temp_dir.path().AppendASCII("script.js"))) { 144 temp_dir.path().AppendASCII("script.js"))) {
145 *error = "Could not copy script file."; 145 *error = "Could not copy script file.";
146 return NULL; 146 return NULL;
147 } 147 }
148 148
149 scoped_refptr<Extension> extension = Extension::Create( 149 scoped_refptr<Extension> extension = Extension::Create(
150 temp_dir.path(), 150 temp_dir.path(),
151 Extension::INTERNAL, 151 Extension::INTERNAL,
152 *root, 152 *root,
153 false, // Do not require key 153 Extension::NO_FLAGS,
154 false, // Disable strict checks
155 error); 154 error);
156 if (!extension) { 155 if (!extension) {
157 NOTREACHED() << "Could not init extension " << *error; 156 NOTREACHED() << "Could not init extension " << *error;
158 return NULL; 157 return NULL;
159 } 158 }
160 159
161 temp_dir.Take(); // The caller takes ownership of the directory. 160 temp_dir.Take(); // The caller takes ownership of the directory.
162 return extension; 161 return extension;
163 } 162 }
OLDNEW
« no previous file with comments | « chrome/browser/background_application_list_model_unittest.cc ('k') | chrome/browser/extensions/convert_web_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698