summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-30 19:57:59 +0000
committerjoaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-30 19:57:59 +0000
commit3e17d3506ca712cc03090679f399db5bbe033470 (patch)
tree762f1f08d6b574e87d91a16332579e9136f329c4
parentb88929f33154d467e04b0b39215b972a4448cfb0 (diff)
downloadchromium_src-3e17d3506ca712cc03090679f399db5bbe033470.zip
chromium_src-3e17d3506ca712cc03090679f399db5bbe033470.tar.gz
chromium_src-3e17d3506ca712cc03090679f399db5bbe033470.tar.bz2
Forward all the arguments from webui to options[2]/ pages.
Some of the functions mapped take more than 1 argument, and all the others are currently always undefined. This breaks locking the default search engine select box through policy. BUG=None TEST=When the DefaultSearchProvider policy is set, the settings UI doesn't allow modifying the default. Review URL: http://codereview.chromium.org/9104011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119716 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/resources/options/chromeos/change_picture_options.js7
-rw-r--r--chrome/browser/resources/options/manage_profile_overlay.js7
-rw-r--r--chrome/browser/resources/options/personal_options.js7
-rw-r--r--chrome/browser/resources/options2/browser_options.js5
-rw-r--r--chrome/browser/resources/options2/chromeos/change_picture_options.js7
-rw-r--r--chrome/browser/resources/options2/manage_profile_overlay.js7
-rw-r--r--chrome/browser/resources/options2/startup_overlay.js5
7 files changed, 26 insertions, 19 deletions
diff --git a/chrome/browser/resources/options/chromeos/change_picture_options.js b/chrome/browser/resources/options/chromeos/change_picture_options.js
index b986743..822df96 100644
--- a/chrome/browser/resources/options/chromeos/change_picture_options.js
+++ b/chrome/browser/resources/options/chromeos/change_picture_options.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -253,8 +253,9 @@ cr.define('options', function() {
'setProfileImage',
'setSelectedImage',
].forEach(function(name) {
- ChangePictureOptions[name] = function(value1, value2) {
- ChangePictureOptions.getInstance()[name + '_'](value1, value2);
+ ChangePictureOptions[name] = function() {
+ var instance = ChangePictureOptions.getInstance();
+ return instance[name + '_'].apply(instance, arguments);
};
});
diff --git a/chrome/browser/resources/options/manage_profile_overlay.js b/chrome/browser/resources/options/manage_profile_overlay.js
index 18cccf2..32fd4f4 100644
--- a/chrome/browser/resources/options/manage_profile_overlay.js
+++ b/chrome/browser/resources/options/manage_profile_overlay.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -253,8 +253,9 @@ cr.define('options', function() {
'showManageDialog',
'showDeleteDialog',
].forEach(function(name) {
- ManageProfileOverlay[name] = function(value) {
- ManageProfileOverlay.getInstance()[name + '_'](value);
+ ManageProfileOverlay[name] = function() {
+ var instance = ManageProfileOverlay.getInstance();
+ return instance[name + '_'].apply(instance, arguments);
};
});
diff --git a/chrome/browser/resources/options/personal_options.js b/chrome/browser/resources/options/personal_options.js
index 78d40dc..1dc9f28 100644
--- a/chrome/browser/resources/options/personal_options.js
+++ b/chrome/browser/resources/options/personal_options.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -359,8 +359,9 @@ cr.define('options', function() {
'setThemesResetButtonEnabled',
'updateAccountPicture',
].forEach(function(name) {
- PersonalOptions[name] = function(value) {
- return PersonalOptions.getInstance()[name + '_'](value);
+ PersonalOptions[name] = function() {
+ var instance = PersonalOptions.getInstance();
+ return instance[name + '_'].apply(instance, arguments);
};
});
diff --git a/chrome/browser/resources/options2/browser_options.js b/chrome/browser/resources/options2/browser_options.js
index 879cf6a..1fbe3cc 100644
--- a/chrome/browser/resources/options2/browser_options.js
+++ b/chrome/browser/resources/options2/browser_options.js
@@ -591,8 +591,9 @@ cr.define('options', function() {
'updateSearchEngines',
'updateStartupPages',
].forEach(function(name) {
- BrowserOptions[name] = function(value) {
- return BrowserOptions.getInstance()[name + '_'](value);
+ BrowserOptions[name] = function() {
+ var instance = BrowserOptions.getInstance();
+ return instance[name + '_'].apply(instance, arguments);
};
});
diff --git a/chrome/browser/resources/options2/chromeos/change_picture_options.js b/chrome/browser/resources/options2/chromeos/change_picture_options.js
index b986743..822df96 100644
--- a/chrome/browser/resources/options2/chromeos/change_picture_options.js
+++ b/chrome/browser/resources/options2/chromeos/change_picture_options.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -253,8 +253,9 @@ cr.define('options', function() {
'setProfileImage',
'setSelectedImage',
].forEach(function(name) {
- ChangePictureOptions[name] = function(value1, value2) {
- ChangePictureOptions.getInstance()[name + '_'](value1, value2);
+ ChangePictureOptions[name] = function() {
+ var instance = ChangePictureOptions.getInstance();
+ return instance[name + '_'].apply(instance, arguments);
};
});
diff --git a/chrome/browser/resources/options2/manage_profile_overlay.js b/chrome/browser/resources/options2/manage_profile_overlay.js
index 18cccf2..32fd4f4 100644
--- a/chrome/browser/resources/options2/manage_profile_overlay.js
+++ b/chrome/browser/resources/options2/manage_profile_overlay.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -253,8 +253,9 @@ cr.define('options', function() {
'showManageDialog',
'showDeleteDialog',
].forEach(function(name) {
- ManageProfileOverlay[name] = function(value) {
- ManageProfileOverlay.getInstance()[name + '_'](value);
+ ManageProfileOverlay[name] = function() {
+ var instance = ManageProfileOverlay.getInstance();
+ return instance[name + '_'].apply(instance, arguments);
};
});
diff --git a/chrome/browser/resources/options2/startup_overlay.js b/chrome/browser/resources/options2/startup_overlay.js
index 3252df4..77ed8cd 100644
--- a/chrome/browser/resources/options2/startup_overlay.js
+++ b/chrome/browser/resources/options2/startup_overlay.js
@@ -122,8 +122,9 @@ cr.define('options', function() {
'updateStartupPages',
'updateAutocompleteSuggestions',
].forEach(function(name) {
- StartupOverlay[name] = function(value) {
- StartupOverlay.getInstance()[name + '_'](value);
+ StartupOverlay[name] = function() {
+ var instance = StartupOverlay.getInstance();
+ return instance[name + '_'].apply(instance, arguments);
};
});