Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2907)

Unified Diff: chrome/browser/rlz/rlz_extension_api.h

Issue 9699054: rlz: Hook up on mac, switch to chrome's network stack on win. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/rlz/rlz_extension_api.h
diff --git a/chrome/browser/rlz/rlz_extension_api.h b/chrome/browser/rlz/rlz_extension_api.h
index d091c85717808eb4b45d49050267db74691e9995..15c58356a771922ea4ab1bedd299f5be0345d2a5 100644
--- a/chrome/browser/rlz/rlz_extension_api.h
+++ b/chrome/browser/rlz/rlz_extension_api.h
@@ -8,9 +8,11 @@
#include "build/build_config.h"
-#if defined(OS_WIN)
+#if defined(OS_WIN) || defined(OS_MACOSX)
+#include "base/memory/scoped_ptr.h"
#include "chrome/browser/extensions/extension_function.h"
+#include "rlz/lib/lib_values.h"
class RlzRecordProductEventFunction : public SyncExtensionFunction {
virtual bool RunImpl() OVERRIDE;
@@ -22,11 +24,27 @@ class RlzGetAccessPointRlzFunction : public SyncExtensionFunction {
DECLARE_EXTENSION_FUNCTION_NAME("experimental.rlz.getAccessPointRlz")
};
-class RlzSendFinancialPingFunction : public SyncExtensionFunction {
+class RlzSendFinancialPingFunction : public AsyncExtensionFunction {
+ public:
+ RlzSendFinancialPingFunction();
+ virtual ~RlzSendFinancialPingFunction();
+
DECLARE_EXTENSION_FUNCTION_NAME("experimental.rlz.sendFinancialPing")
// Making this function protected so that it can be overridden in tests.
protected:
virtual bool RunImpl() OVERRIDE;
+
+ private:
+ void WorkOnWorkerThread();
+ void RespondOnUIThread();
+
+ rlz_lib::Product product_;
+ scoped_array<rlz_lib::AccessPoint> access_points_;
+ std::string signature_;
+ std::string brand_;
+ std::string id_;
+ std::string lang_;
+ bool exclude_machine_id_;
};
class RlzClearProductStateFunction : public SyncExtensionFunction {
@@ -34,6 +52,6 @@ class RlzClearProductStateFunction : public SyncExtensionFunction {
DECLARE_EXTENSION_FUNCTION_NAME("experimental.rlz.clearProductState")
};
-#endif // defined(OS_WIN)
+#endif // defined(OS_WIN) || defined(OS_MACOSX)
#endif // CHROME_BROWSER_RLZ_RLZ_EXTENSION_API_H_

Powered by Google App Engine
This is Rietveld 408576698