summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_rlz_module.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/extensions/extension_rlz_module.cc')
-rw-r--r--chrome/browser/extensions/extension_rlz_module.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/chrome/browser/extensions/extension_rlz_module.cc b/chrome/browser/extensions/extension_rlz_module.cc
index 25724be..e31fc69 100644
--- a/chrome/browser/extensions/extension_rlz_module.cc
+++ b/chrome/browser/extensions/extension_rlz_module.cc
@@ -144,10 +144,18 @@ bool RlzSendFinancialPingFunction::RunImpl() {
bool exclude_machine_id;
EXTENSION_FUNCTION_VALIDATE(args_->GetBoolean(6, &exclude_machine_id));
- return rlz_lib::SendFinancialPing(product, access_points.get(),
- signature.c_str(), brand.c_str(),
- id.c_str(), lang.c_str(),
- exclude_machine_id);
+ // rlz_lib::SendFinancialPing() will not send a ping more often than once in
+ // any 24-hour period. Calling it more often has no effect. If a ping is
+ // not sent false is returned, but this is not an error, so we should not
+ // use the return value of rlz_lib::SendFinancialPing() as the return value
+ // of this function. Callers interested in the return value can register
+ // an optional callback function.
+ bool sent = rlz_lib::SendFinancialPing(product, access_points.get(),
+ signature.c_str(), brand.c_str(),
+ id.c_str(), lang.c_str(),
+ exclude_machine_id);
+ result_.reset(Value::CreateBooleanValue(sent));
+ return true;
}
bool RlzClearProductStateFunction::RunImpl() {