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

Side by Side Diff: chrome/browser/extensions/crx_installer.h

Issue 8890086: Issue 71980: Extensions code should use UTF-16 for user-visible Unicode strings (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years 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 #ifndef CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_
6 #define CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 virtual ~CrxInstaller(); 191 virtual ~CrxInstaller();
192 192
193 // Converts the source user script to an extension. 193 // Converts the source user script to an extension.
194 void ConvertUserScriptOnFileThread(); 194 void ConvertUserScriptOnFileThread();
195 195
196 // Converts the source web app to an extension. 196 // Converts the source web app to an extension.
197 void ConvertWebAppOnFileThread(const WebApplicationInfo& web_app); 197 void ConvertWebAppOnFileThread(const WebApplicationInfo& web_app);
198 198
199 // Called after OnUnpackSuccess as a last check to see whether the install 199 // Called after OnUnpackSuccess as a last check to see whether the install
200 // should complete. 200 // should complete.
201 bool AllowInstall(const Extension* extension, std::string* error); 201 bool AllowInstall(const Extension* extension, string16* error);
202 202
203 // SandboxedExtensionUnpackerClient 203 // SandboxedExtensionUnpackerClient
204 virtual void OnUnpackFailure(const std::string& error_message) OVERRIDE; 204 virtual void OnUnpackFailure(const string16& error_message) OVERRIDE;
205 virtual void OnUnpackSuccess(const FilePath& temp_dir, 205 virtual void OnUnpackSuccess(const FilePath& temp_dir,
206 const FilePath& extension_dir, 206 const FilePath& extension_dir,
207 const base::DictionaryValue* original_manifest, 207 const base::DictionaryValue* original_manifest,
208 const Extension* extension) OVERRIDE; 208 const Extension* extension) OVERRIDE;
209 209
210 // Returns true if we can skip confirmation because the install was 210 // Returns true if we can skip confirmation because the install was
211 // whitelisted. 211 // whitelisted.
212 bool CanSkipConfirmation(); 212 bool CanSkipConfirmation();
213 213
214 // Runs on the UI thread. Confirms with the user (via ExtensionInstallUI) that 214 // Runs on the UI thread. Confirms with the user (via ExtensionInstallUI) that
215 // it is OK to install this extension. 215 // it is OK to install this extension.
216 void ConfirmInstall(); 216 void ConfirmInstall();
217 217
218 // Runs on File thread. Install the unpacked extension into the profile and 218 // Runs on File thread. Install the unpacked extension into the profile and
219 // notify the frontend. 219 // notify the frontend.
220 void CompleteInstall(); 220 void CompleteInstall();
221 221
222 // Result reporting. 222 // Result reporting.
223 void ReportFailureFromFileThread(const std::string& error); 223 void ReportFailureFromFileThread(const string16& error);
224 void ReportFailureFromUIThread(const std::string& error); 224 void ReportFailureFromUIThread(const string16& error);
225 void ReportSuccessFromFileThread(); 225 void ReportSuccessFromFileThread();
226 void ReportSuccessFromUIThread(); 226 void ReportSuccessFromUIThread();
227 void NotifyCrxInstallComplete(const Extension* extension); 227 void NotifyCrxInstallComplete(const Extension* extension);
228 228
229 // The file we're installing. 229 // The file we're installing.
230 FilePath source_file_; 230 FilePath source_file_;
231 231
232 // The URL the file was downloaded from. 232 // The URL the file was downloaded from.
233 GURL download_url_; 233 GURL download_url_;
234 234
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 extension_misc::CrxInstallCause install_cause_; 325 extension_misc::CrxInstallCause install_cause_;
326 326
327 // Creation flags to use for the extension. These flags will be used 327 // Creation flags to use for the extension. These flags will be used
328 // when calling Extenion::Create() by the crx installer. 328 // when calling Extenion::Create() by the crx installer.
329 int creation_flags_; 329 int creation_flags_;
330 330
331 DISALLOW_COPY_AND_ASSIGN(CrxInstaller); 331 DISALLOW_COPY_AND_ASSIGN(CrxInstaller);
332 }; 332 };
333 333
334 #endif // CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ 334 #endif // CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698