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

Unified Diff: chrome/browser/extensions/crx_installer.h

Issue 308003005: app_list: Drive app integration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/drive/fake_drive_service.cc ('k') | chrome/browser/extensions/crx_installer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/crx_installer.h
diff --git a/chrome/browser/extensions/crx_installer.h b/chrome/browser/extensions/crx_installer.h
index fe34b2f1ec016ead88a6f14d973d070a1f152de1..024931d02eb83313a646c7b96ae86199a37b94e7 100644
--- a/chrome/browser/extensions/crx_installer.h
+++ b/chrome/browser/extensions/crx_installer.h
@@ -184,24 +184,13 @@ class CrxInstaller
}
void set_install_immediately(bool val) {
- if (val)
- install_flags_ |= kInstallFlagInstallImmediately;
- else
- install_flags_ &= ~kInstallFlagInstallImmediately;
+ set_install_flag(kInstallFlagInstallImmediately, val);
}
-
void set_is_ephemeral(bool val) {
- if (val)
- install_flags_ |= kInstallFlagIsEphemeral;
- else
- install_flags_ &= ~kInstallFlagIsEphemeral;
+ set_install_flag(kInstallFlagIsEphemeral, val);
}
-
- void set_install_flag(int flag, bool val) {
- if (val)
- install_flags_ |= flag;
- else
- install_flags_ &= ~flag;
+ void set_do_not_sync(bool val) {
+ set_install_flag(kInstallFlagDoNotSync, val);
}
bool did_handle_successfully() const { return did_handle_successfully_; }
@@ -210,6 +199,8 @@ class CrxInstaller
const Extension* extension() { return installer_.extension().get(); }
+ const std::string& current_version() const { return current_version_; }
+
private:
friend class ::ExtensionServiceTest;
friend class ExtensionUpdaterTest;
@@ -224,8 +215,7 @@ class CrxInstaller
void ConvertUserScriptOnFileThread();
// Converts the source web app to an extension.
- void ConvertWebAppOnFileThread(const WebApplicationInfo& web_app,
- const base::FilePath& install_directory);
+ void ConvertWebAppOnFileThread(const WebApplicationInfo& web_app);
// Called after OnUnpackSuccess as a last check to see whether the install
// should complete.
@@ -279,6 +269,13 @@ class CrxInstaller
// and needs additional permissions.
void ConfirmReEnable();
+ void set_install_flag(int flag, bool val) {
+ if (val)
+ install_flags_ |= flag;
+ else
+ install_flags_ &= ~flag;
+ }
+
// The file we're installing.
base::FilePath source_file_;
@@ -286,7 +283,7 @@ class CrxInstaller
GURL download_url_;
// The directory extensions are installed to.
- base::FilePath install_directory_;
+ const base::FilePath install_directory_;
// The location the installation came from (bundled with Chromium, registry,
// manual install, etc). This metadata is saved with the installation if
« no previous file with comments | « chrome/browser/drive/fake_drive_service.cc ('k') | chrome/browser/extensions/crx_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698