| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/android/data_usage/tab_data_use_entry.h" | 5 #include "chrome/browser/android/data_usage/tab_data_use_entry.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 class TabDataUseEntryTest : public testing::Test { | 67 class TabDataUseEntryTest : public testing::Test { |
| 68 public: | 68 public: |
| 69 TabDataUseEntryTest() { | 69 TabDataUseEntryTest() { |
| 70 tab_model_.reset(new DataUseTabModel()); | 70 tab_model_.reset(new DataUseTabModel()); |
| 71 tick_clock_ = new SimpleOffsetTestTickClock(); | 71 tick_clock_ = new SimpleOffsetTestTickClock(); |
| 72 tab_model_->tick_clock_.reset(tick_clock_); | 72 tab_model_->tick_clock_.reset(tick_clock_); |
| 73 tab_entry_.reset(new TabDataUseEntry(tab_model_.get())); | 73 tab_entry_.reset(new TabDataUseEntry(tab_model_.get())); |
| 74 } | 74 } |
| 75 | 75 |
| 76 const size_t GetMaxSessionsPerTab() const { | 76 size_t GetMaxSessionsPerTab() const { |
| 77 return tab_model_->max_sessions_per_tab(); | 77 return tab_model_->max_sessions_per_tab(); |
| 78 } | 78 } |
| 79 | 79 |
| 80 const base::TimeDelta& GetClosedTabExpirationDuration() const { | 80 const base::TimeDelta& GetClosedTabExpirationDuration() const { |
| 81 return tab_model_->closed_tab_expiration_duration(); | 81 return tab_model_->closed_tab_expiration_duration(); |
| 82 } | 82 } |
| 83 | 83 |
| 84 const base::TimeDelta& GetOpenTabExpirationDuration() const { | 84 const base::TimeDelta& GetOpenTabExpirationDuration() const { |
| 85 return tab_model_->open_tab_expiration_duration(); | 85 return tab_model_->open_tab_expiration_duration(); |
| 86 } | 86 } |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 EXPECT_TRUE(tab_entry_->EndTracking()); | 540 EXPECT_TRUE(tab_entry_->EndTracking()); |
| 541 | 541 |
| 542 histogram_tester.ExpectUniqueSample( | 542 histogram_tester.ExpectUniqueSample( |
| 543 kUMAOldInactiveSessionRemovalDurationSecondsHistogram, | 543 kUMAOldInactiveSessionRemovalDurationSecondsHistogram, |
| 544 base::TimeDelta::FromSeconds(30).InMilliseconds(), 1); | 544 base::TimeDelta::FromSeconds(30).InMilliseconds(), 1); |
| 545 } | 545 } |
| 546 | 546 |
| 547 } // namespace android | 547 } // namespace android |
| 548 | 548 |
| 549 } // namespace chrome | 549 } // namespace chrome |
| OLD | NEW |