summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_apitest.cc
diff options
context:
space:
mode:
authormpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-29 23:14:02 +0000
committermpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-29 23:14:02 +0000
commit9adb9693e8a90bb63be325dbb5d3391f47f839ba (patch)
tree555765afd7bc851de6f3a2bf4a35151435d58d77 /chrome/browser/extensions/extension_apitest.cc
parent5b5a5c976aead85a87ced0847c068012d3979cae (diff)
downloadchromium_src-9adb9693e8a90bb63be325dbb5d3391f47f839ba.zip
chromium_src-9adb9693e8a90bb63be325dbb5d3391f47f839ba.tar.gz
chromium_src-9adb9693e8a90bb63be325dbb5d3391f47f839ba.tar.bz2
Part 3 of immutable Extension refactor.
Make ExtensionsService hold const Extension pointers only. This ensures that extensions can't be modified after they're created, and lets us share them between threads. BUG=56558 TEST=no functional change Review URL: http://codereview.chromium.org/4138006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64517 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_apitest.cc')
-rw-r--r--chrome/browser/extensions/extension_apitest.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/extensions/extension_apitest.cc b/chrome/browser/extensions/extension_apitest.cc
index 0547554..07668b3 100644
--- a/chrome/browser/extensions/extension_apitest.cc
+++ b/chrome/browser/extensions/extension_apitest.cc
@@ -144,7 +144,7 @@ bool ExtensionApiTest::RunExtensionTestImpl(const char* extension_name,
"Relative page_url given with no extension_name";
ExtensionsService* service = browser()->profile()->GetExtensionsService();
- Extension* extension =
+ const Extension* extension =
service->GetExtensionById(last_loaded_extension_id_, false);
if (!extension)
return false;
@@ -165,7 +165,7 @@ bool ExtensionApiTest::RunExtensionTestImpl(const char* extension_name,
}
// Test that exactly one extension loaded.
-Extension* ExtensionApiTest::GetSingleLoadedExtension() {
+const Extension* ExtensionApiTest::GetSingleLoadedExtension() {
ExtensionsService* service = browser()->profile()->GetExtensionsService();
int found_extension_index = -1;
@@ -185,7 +185,7 @@ Extension* ExtensionApiTest::GetSingleLoadedExtension() {
found_extension_index = static_cast<int>(i);
}
- Extension* extension = service->extensions()->at(found_extension_index);
+ const Extension* extension = service->extensions()->at(found_extension_index);
if (!extension) {
message_ = "extension pointer is NULL.";
return NULL;