OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_RLZ_RLZ_H_ | 5 #ifndef CHROME_BROWSER_RLZ_RLZ_H_ |
6 #define CHROME_BROWSER_RLZ_RLZ_H_ | 6 #define CHROME_BROWSER_RLZ_RLZ_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 class RLZTracker { | 28 class RLZTracker { |
29 | 29 |
30 public: | 30 public: |
31 // Like InitRlz() this function initializes the RLZ library services for use | 31 // Like InitRlz() this function initializes the RLZ library services for use |
32 // in chrome. Besides binding the dll, it schedules a delayed task (delayed | 32 // in chrome. Besides binding the dll, it schedules a delayed task (delayed |
33 // by |delay| seconds) that performs the ping and registers some events | 33 // by |delay| seconds) that performs the ping and registers some events |
34 // when 'first-run' is true. | 34 // when 'first-run' is true. |
35 // | 35 // |
36 // If the chrome brand is organic (no partners) then the RLZ library is not | 36 // If the chrome brand is organic (no partners) then the RLZ library is not |
37 // loaded or initialized and the pings don't ocurr. | 37 // loaded or initialized and the pings don't ocurr. |
38 static bool InitRlzDelayed(bool first_run, int delay); | 38 static bool InitRlzDelayed(bool first_run, int delay, |
| 39 bool google_default_search); |
39 | 40 |
40 // Records an RLZ event. Some events can be access point independent. | 41 // Records an RLZ event. Some events can be access point independent. |
41 // Returns false it the event could not be recorded. Requires write access | 42 // Returns false it the event could not be recorded. Requires write access |
42 // to the HKCU registry hive on windows. | 43 // to the HKCU registry hive on windows. |
43 static bool RecordProductEvent(rlz_lib::Product product, | 44 static bool RecordProductEvent(rlz_lib::Product product, |
44 rlz_lib::AccessPoint point, | 45 rlz_lib::AccessPoint point, |
45 rlz_lib::Event event_id); | 46 rlz_lib::Event event_id); |
46 | 47 |
47 // Get the RLZ value of the access point. | 48 // Get the RLZ value of the access point. |
48 // Returns false if the rlz string could not be obtained. In some cases | 49 // Returns false if the rlz string could not be obtained. In some cases |
49 // an empty string can be returned which is not an error. | 50 // an empty string can be returned which is not an error. |
50 static bool GetAccessPointRlz(rlz_lib::AccessPoint point, std::wstring* rlz); | 51 static bool GetAccessPointRlz(rlz_lib::AccessPoint point, std::wstring* rlz); |
51 | 52 |
52 // Clear all events reported by this product. In Chrome this will be called | 53 // Clear all events reported by this product. In Chrome this will be called |
53 // when it is un-installed. | 54 // when it is un-installed. |
54 static bool ClearAllProductEvents(rlz_lib::Product product); | 55 static bool ClearAllProductEvents(rlz_lib::Product product); |
55 | 56 |
56 // Invoked during shutdown to clean up any state created by RLZTracker. | 57 // Invoked during shutdown to clean up any state created by RLZTracker. |
57 static void CleanupRlz(); | 58 static void CleanupRlz(); |
58 | 59 |
59 private: | 60 private: |
60 DISALLOW_IMPLICIT_CONSTRUCTORS(RLZTracker); | 61 DISALLOW_IMPLICIT_CONSTRUCTORS(RLZTracker); |
61 }; | 62 }; |
62 | 63 |
63 #endif // defined(OS_WIN) | 64 #endif // defined(OS_WIN) |
64 | 65 |
65 #endif // CHROME_BROWSER_RLZ_RLZ_H_ | 66 #endif // CHROME_BROWSER_RLZ_RLZ_H_ |
OLD | NEW |