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

Unified Diff: chrome/common/extensions/extension.cc

Issue 9877018: Lazy background page branding: "Transient Background Page". Rename (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: .. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/extension.h ('k') | chrome/common/extensions/extension_manifest_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension.cc
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index 4ef186a58bf4c447068aa6f00017e923e2699dd8..dffefb156ae187395792e91c097d2ed71791f9ac 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -1386,7 +1386,7 @@ bool Extension::LoadSharedFeatures(
// LoadBackgroundScripts() must be called before LoadBackgroundPage().
!LoadBackgroundScripts(error) ||
!LoadBackgroundPage(api_permissions, error) ||
- !LoadBackgroundPersistent(api_permissions, error) ||
+ !LoadBackgroundTransient(api_permissions, error) ||
!LoadBackgroundAllowJSAccess(api_permissions, error) ||
!LoadWebIntentServices(error))
return false;
@@ -1799,22 +1799,22 @@ bool Extension::LoadBackgroundPage(
return true;
}
-bool Extension::LoadBackgroundPersistent(
+bool Extension::LoadBackgroundTransient(
const ExtensionAPIPermissionSet& api_permissions,
string16* error) {
- Value* background_persistent = NULL;
+ Value* background_transient = NULL;
if (!api_permissions.count(ExtensionAPIPermission::kExperimental) ||
- !manifest_->Get(keys::kBackgroundPersistent, &background_persistent))
+ !manifest_->Get(keys::kBackgroundTransient, &background_transient))
return true;
- if (!background_persistent->IsType(Value::TYPE_BOOLEAN) ||
- !background_persistent->GetAsBoolean(&background_page_persists_)) {
- *error = ASCIIToUTF16(errors::kInvalidBackgroundPersistent);
+ if (!background_transient->IsType(Value::TYPE_BOOLEAN) ||
+ !background_transient->GetAsBoolean(&background_page_is_transient_)) {
+ *error = ASCIIToUTF16(errors::kInvalidBackgroundTransient);
return false;
}
if (!has_background_page()) {
- *error = ASCIIToUTF16(errors::kInvalidBackgroundPersistentNoPage);
+ *error = ASCIIToUTF16(errors::kInvalidBackgroundTransientNoPage);
return false;
}
@@ -2732,7 +2732,7 @@ Extension::Extension(const FilePath& path,
incognito_split_mode_(false),
offline_enabled_(false),
converted_from_user_script_(false),
- background_page_persists_(true),
+ background_page_is_transient_(false),
allow_background_js_access_(true),
manifest_(manifest.release()),
is_storage_isolated_(false),
« no previous file with comments | « chrome/common/extensions/extension.h ('k') | chrome/common/extensions/extension_manifest_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698