Fix build break
[chromium-blink-merge.git] / chrome / browser / rlz / rlz_extension_api.h
bloba077e598efcce161ae64c37f9320718868ecbe42
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_RLZ_RLZ_EXTENSION_API_H_
6 #define CHROME_BROWSER_RLZ_RLZ_EXTENSION_API_H_
8 #include "build/build_config.h"
10 #if defined(ENABLE_RLZ)
12 #include "base/memory/scoped_ptr.h"
13 #include "chrome/browser/extensions/extension_function.h"
14 #include "rlz/lib/lib_values.h"
16 class RlzRecordProductEventFunction : public SyncExtensionFunction {
17 public:
18 DECLARE_EXTENSION_FUNCTION("experimental.rlz.recordProductEvent",
19 EXPERIMENTAL_RLZ_RECORDPRODUCTEVENT)
21 protected:
22 virtual ~RlzRecordProductEventFunction() {}
24 // ExtensionFunction:
25 virtual bool RunImpl() OVERRIDE;
28 class RlzGetAccessPointRlzFunction : public SyncExtensionFunction {
29 public:
30 DECLARE_EXTENSION_FUNCTION("experimental.rlz.getAccessPointRlz",
31 EXPERIMENTAL_RLZ_GETACCESSPOINTRLZ)
33 protected:
34 virtual ~RlzGetAccessPointRlzFunction() {}
36 // ExtensionFunction:
37 virtual bool RunImpl() OVERRIDE;
40 class RlzSendFinancialPingFunction : public AsyncExtensionFunction {
41 public:
42 DECLARE_EXTENSION_FUNCTION("experimental.rlz.sendFinancialPing",
43 EXPERIMENTAL_RLZ_SENDFINANCIALPING)
45 RlzSendFinancialPingFunction();
47 protected:
48 friend class MockRlzSendFinancialPingFunction;
49 virtual ~RlzSendFinancialPingFunction();
51 // ExtensionFunction:
52 virtual bool RunImpl() OVERRIDE;
54 private:
55 void WorkOnWorkerThread();
56 void RespondOnUIThread();
58 rlz_lib::Product product_;
59 scoped_ptr<rlz_lib::AccessPoint[]> access_points_;
60 std::string signature_;
61 std::string brand_;
62 std::string id_;
63 std::string lang_;
64 bool exclude_machine_id_;
67 class RlzClearProductStateFunction : public SyncExtensionFunction {
68 public:
69 DECLARE_EXTENSION_FUNCTION("experimental.rlz.clearProductState",
70 EXPERIMENTAL_RLZ_CLEARPRODUCTSTATE)
72 protected:
73 virtual ~RlzClearProductStateFunction() {}
75 // ExtensionFunction:
76 virtual bool RunImpl() OVERRIDE;
79 #endif // defined(ENABLE_RLZ)
81 #endif // CHROME_BROWSER_RLZ_RLZ_EXTENSION_API_H_