summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_tabs_module.cc
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-26 18:47:56 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-26 18:47:56 +0000
commit7386be50a212a569840f8da41be445cb00e90beb (patch)
tree965fdca5ee8b0d392481975f107689dbd50acdc8 /chrome/browser/extensions/extension_tabs_module.cc
parent8f5d9b53d113c26935205c71a128d055e60cd787 (diff)
downloadchromium_src-7386be50a212a569840f8da41be445cb00e90beb.zip
chromium_src-7386be50a212a569840f8da41be445cb00e90beb.tar.gz
chromium_src-7386be50a212a569840f8da41be445cb00e90beb.tar.bz2
Fixes bug in extensions where we wouldn't allow an extension to select
a pinned tab. BUG=33123 TEST=see bug Review URL: http://codereview.chromium.org/661128 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40136 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_tabs_module.cc')
-rw-r--r--chrome/browser/extensions/extension_tabs_module.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
index c602cf6..85f6fc2 100644
--- a/chrome/browser/extensions/extension_tabs_module.cc
+++ b/chrome/browser/extensions/extension_tabs_module.cc
@@ -580,12 +580,6 @@ bool UpdateTabFunction::RunImpl() {
NULL, &tab_strip, &contents, &tab_index, &error_))
return false;
- if (tab_strip->IsTabPinned(tab_index)) {
- // Don't allow changing the url of pinned tabs.
- error_ = keys::kCannotUpdatePinnedTab;
- return false;
- }
-
NavigationController& controller = contents->controller();
// TODO(rafaelw): handle setting remaining tab properties:
@@ -620,6 +614,12 @@ bool UpdateTabFunction::RunImpl() {
// controller->GetURL()?
}
+ if (tab_strip->IsTabPinned(tab_index)) {
+ // Don't allow changing the url of pinned tabs.
+ error_ = keys::kCannotUpdatePinnedTab;
+ return false;
+ }
+
controller.LoadURL(new_gurl, GURL(), PageTransition::LINK);
// The URL of a tab contents never actually changes to a JavaScript URL, so