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 "components/rlz/rlz_tracker.h" | 5 #include "components/rlz/rlz_tracker.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 using testing::AssertionResult; | 27 using testing::AssertionResult; |
28 using testing::AssertionSuccess; | 28 using testing::AssertionSuccess; |
29 using testing::AssertionFailure; | 29 using testing::AssertionFailure; |
30 | 30 |
31 namespace rlz { | 31 namespace rlz { |
32 namespace { | 32 namespace { |
33 | 33 |
34 class TestRLZTrackerDelegate : public RLZTrackerDelegate { | 34 class TestRLZTrackerDelegate : public RLZTrackerDelegate { |
35 public: | 35 public: |
36 TestRLZTrackerDelegate() | 36 TestRLZTrackerDelegate() |
37 : worker_pool_owner_(1, "TestRLZTracker"), | 37 : worker_pool_owner_(2, "TestRLZTracker"), |
38 request_context_getter_(new net::TestURLRequestContextGetter( | 38 request_context_getter_(new net::TestURLRequestContextGetter( |
39 base::ThreadTaskRunnerHandle::Get())) {} | 39 base::ThreadTaskRunnerHandle::Get())) {} |
40 | 40 |
41 void set_brand(const char* brand) { brand_override_ = brand; } | 41 void set_brand(const char* brand) { brand_override_ = brand; } |
42 | 42 |
43 void set_reactivation_brand(const char* reactivation_brand) { | 43 void set_reactivation_brand(const char* reactivation_brand) { |
44 // TODO(thakis): Reactivation doesn't exist on Mac yet. | 44 // TODO(thakis): Reactivation doesn't exist on Mac yet. |
45 reactivation_brand_override_ = reactivation_brand; | 45 reactivation_brand_override_ = reactivation_brand; |
46 } | 46 } |
47 | 47 |
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 | 1002 |
1003 ExpectEventRecorded(OmniboxFirstSearch(), true); | 1003 ExpectEventRecorded(OmniboxFirstSearch(), true); |
1004 | 1004 |
1005 RLZTracker::ClearRlzState(); | 1005 RLZTracker::ClearRlzState(); |
1006 | 1006 |
1007 ExpectEventRecorded(OmniboxFirstSearch(), false); | 1007 ExpectEventRecorded(OmniboxFirstSearch(), false); |
1008 } | 1008 } |
1009 #endif // defined(OS_CHROMEOS) | 1009 #endif // defined(OS_CHROMEOS) |
1010 | 1010 |
1011 } // namespace rlz | 1011 } // namespace rlz |
OLD | NEW |