| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 #include "chrome/browser/rlz/rlz.h" | 5 #include "chrome/browser/rlz/rlz.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "chrome/browser/autocomplete/autocomplete_controller.h" | 10 #include "chrome/browser/autocomplete/autocomplete_controller.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 130 |
| 131 bool ScheduleGetAccessPointRlz(rlz_lib::AccessPoint point) override { | 131 bool ScheduleGetAccessPointRlz(rlz_lib::AccessPoint point) override { |
| 132 return !assume_not_ui_thread_; | 132 return !assume_not_ui_thread_; |
| 133 } | 133 } |
| 134 | 134 |
| 135 bool ScheduleRecordFirstSearch(rlz_lib::AccessPoint point) override { | 135 bool ScheduleRecordFirstSearch(rlz_lib::AccessPoint point) override { |
| 136 return !assume_not_ui_thread_; | 136 return !assume_not_ui_thread_; |
| 137 } | 137 } |
| 138 | 138 |
| 139 #if defined(OS_CHROMEOS) | 139 #if defined(OS_CHROMEOS) |
| 140 virtual bool ScheduleClearRlzState() override { | 140 bool ScheduleClearRlzState() override { |
| 141 return !assume_not_ui_thread_; | 141 return !assume_not_ui_thread_; |
| 142 } | 142 } |
| 143 #endif | 143 #endif |
| 144 | 144 |
| 145 bool SendFinancialPing(const std::string& brand, | 145 bool SendFinancialPing(const std::string& brand, |
| 146 const base::string16& lang, | 146 const base::string16& lang, |
| 147 const base::string16& referral) override { | 147 const base::string16& referral) override { |
| 148 // Don't ping the server during tests, just pretend as if we did. | 148 // Don't ping the server during tests, just pretend as if we did. |
| 149 EXPECT_FALSE(brand.empty()); | 149 EXPECT_FALSE(brand.empty()); |
| 150 pinged_brands_.insert(brand); | 150 pinged_brands_.insert(brand); |
| (...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 906 RLZTracker::RecordProductEvent(rlz_lib::CHROME, RLZTracker::ChromeOmnibox(), | 906 RLZTracker::RecordProductEvent(rlz_lib::CHROME, RLZTracker::ChromeOmnibox(), |
| 907 rlz_lib::FIRST_SEARCH); | 907 rlz_lib::FIRST_SEARCH); |
| 908 | 908 |
| 909 ExpectEventRecorded(kOmniboxFirstSearch, true); | 909 ExpectEventRecorded(kOmniboxFirstSearch, true); |
| 910 | 910 |
| 911 RLZTracker::ClearRlzState(); | 911 RLZTracker::ClearRlzState(); |
| 912 | 912 |
| 913 ExpectEventRecorded(kOmniboxFirstSearch, false); | 913 ExpectEventRecorded(kOmniboxFirstSearch, false); |
| 914 } | 914 } |
| 915 #endif // defined(OS_CHROMEOS) | 915 #endif // defined(OS_CHROMEOS) |
| OLD | NEW |