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

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

Issue 264763002: Support remote installation of extensions and apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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) 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 #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 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 expected_version_.reset(new Version(val)); 126 expected_version_.reset(new Version(val));
127 expected_version_strict_checking_ = true; 127 expected_version_strict_checking_ = true;
128 } 128 }
129 129
130 bool delete_source() const { return delete_source_; } 130 bool delete_source() const { return delete_source_; }
131 void set_delete_source(bool val) { delete_source_ = val; } 131 void set_delete_source(bool val) { delete_source_ = val; }
132 132
133 bool allow_silent_install() const { return allow_silent_install_; } 133 bool allow_silent_install() const { return allow_silent_install_; }
134 void set_allow_silent_install(bool val) { allow_silent_install_ = val; } 134 void set_allow_silent_install(bool val) { allow_silent_install_ = val; }
135 135
136 bool grant_permissions() const { return grant_permissions_; }
137 void set_grant_permissions(bool val) { grant_permissions_ = val; }
138
136 bool is_gallery_install() const { 139 bool is_gallery_install() const {
137 return (creation_flags_ & Extension::FROM_WEBSTORE) > 0; 140 return (creation_flags_ & Extension::FROM_WEBSTORE) > 0;
138 } 141 }
139 void set_is_gallery_install(bool val) { 142 void set_is_gallery_install(bool val) {
140 if (val) 143 if (val)
141 creation_flags_ |= Extension::FROM_WEBSTORE; 144 creation_flags_ |= Extension::FROM_WEBSTORE;
142 else 145 else
143 creation_flags_ &= ~Extension::FROM_WEBSTORE; 146 creation_flags_ &= ~Extension::FROM_WEBSTORE;
144 } 147 }
145 148
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 340
338 // The root of the unpacked extension directory. This is a subdirectory of 341 // The root of the unpacked extension directory. This is a subdirectory of
339 // temp_dir_, so we don't have to delete it explicitly. 342 // temp_dir_, so we don't have to delete it explicitly.
340 base::FilePath unpacked_extension_root_; 343 base::FilePath unpacked_extension_root_;
341 344
342 // True when the CRX being installed was just downloaded. 345 // True when the CRX being installed was just downloaded.
343 // Used to trigger extra checks before installing. 346 // Used to trigger extra checks before installing.
344 bool apps_require_extension_mime_type_; 347 bool apps_require_extension_mime_type_;
345 348
346 // Allows for the possibility of a normal install (one in which a |client| 349 // Allows for the possibility of a normal install (one in which a |client|
347 // is provided in the ctor) to procede without showing the permissions prompt 350 // is provided in the ctor) to procede without showing the permissions prompt
Yoyo Zhou 2014/05/05 22:35:17 nit: procede -> proceed
Marijn Kruisselbrink 2014/05/14 23:30:02 Done.
348 // dialog. 351 // dialog.
349 bool allow_silent_install_; 352 bool allow_silent_install_;
350 353
354 // Allows for the possibility of an installation without granting any
355 // permissions to the extension.
356 bool grant_permissions_;
357
351 // The value of the content type header sent with the CRX. 358 // The value of the content type header sent with the CRX.
352 // Ignorred unless |require_extension_mime_type_| is true. 359 // Ignorred unless |require_extension_mime_type_| is true.
353 std::string original_mime_type_; 360 std::string original_mime_type_;
354 361
355 // What caused this install? Used only for histograms that report 362 // What caused this install? Used only for histograms that report
356 // on failure rates, broken down by the cause of the install. 363 // on failure rates, broken down by the cause of the install.
357 extension_misc::CrxInstallCause install_cause_; 364 extension_misc::CrxInstallCause install_cause_;
358 365
359 // Creation flags to use for the extension. These flags will be used 366 // Creation flags to use for the extension. These flags will be used
360 // when calling Extenion::Create() by the crx installer. 367 // when calling Extenion::Create() by the crx installer.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 400
394 // Gives access to common methods and data of an extension installer. 401 // Gives access to common methods and data of an extension installer.
395 ExtensionInstaller installer_; 402 ExtensionInstaller installer_;
396 403
397 DISALLOW_COPY_AND_ASSIGN(CrxInstaller); 404 DISALLOW_COPY_AND_ASSIGN(CrxInstaller);
398 }; 405 };
399 406
400 } // namespace extensions 407 } // namespace extensions
401 408
402 #endif // CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ 409 #endif // CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698