summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui
diff options
context:
space:
mode:
authorsatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-26 09:33:43 +0000
committersatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-26 09:33:43 +0000
commit077650704412c550dbe60f5895c6549f7e66bed2 (patch)
tree8a2eb3ccea454d659640f14d61ae778d310e4270 /chrome/browser/dom_ui
parent4c8ed11d96fb332c7dc998e1f5656d8aa41a4a4b (diff)
downloadchromium_src-077650704412c550dbe60f5895c6549f7e66bed2.zip
chromium_src-077650704412c550dbe60f5895c6549f7e66bed2.tar.gz
chromium_src-077650704412c550dbe60f5895c6549f7e66bed2.tar.bz2
Show "Checking for update..." for at least one second.
Before the fix, it's very hard to read "Checking for update..." text when no update is avaiblable, as the text flashes quickly. We should show this message at least for one second. TEST=confirmed that the message was shown for a second. Also played with the developer tools by calling AboutPage.updateStatusCallback() manually. BUG=chromium-os:9293 Review URL: http://codereview.chromium.org/5375002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67443 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui')
-rw-r--r--chrome/browser/dom_ui/options/about_page_handler.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/chrome/browser/dom_ui/options/about_page_handler.cc b/chrome/browser/dom_ui/options/about_page_handler.cc
index 610246d..02579bc 100644
--- a/chrome/browser/dom_ui/options/about_page_handler.cc
+++ b/chrome/browser/dom_ui/options/about_page_handler.cc
@@ -368,9 +368,13 @@ void AboutPageHandler::UpdateStatus(
break;
}
if (message.size()) {
- scoped_ptr<Value> version_string(Value::CreateStringValue(message));
+ scoped_ptr<Value> update_message(Value::CreateStringValue(message));
+ // "Checking for update..." needs to be shown for a while, so users
+ // can read it, hence insert delay for this.
+ scoped_ptr<Value> insert_delay(Value::CreateBooleanValue(
+ status.status == chromeos::UPDATE_STATUS_CHECKING_FOR_UPDATE));
dom_ui_->CallJavascriptFunction(L"AboutPage.updateStatusCallback",
- *version_string);
+ *update_message, *insert_delay);
scoped_ptr<Value> enabled_value(Value::CreateBooleanValue(enabled));
dom_ui_->CallJavascriptFunction(L"AboutPage.updateEnableCallback",