| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/offline_pages/client_policy_controller.h" | 5 #include "components/offline_pages/core/client_policy_controller.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| 11 #include "components/offline_pages/client_namespace_constants.h" | 11 #include "components/offline_pages/core/client_namespace_constants.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 13 |
| 14 using LifetimeType = offline_pages::LifetimePolicy::LifetimeType; | 14 using LifetimeType = offline_pages::LifetimePolicy::LifetimeType; |
| 15 | 15 |
| 16 namespace offline_pages { | 16 namespace offline_pages { |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 const char kUndefinedNamespace[] = "undefined"; | 19 const char kUndefinedNamespace[] = "undefined"; |
| 20 | 20 |
| 21 bool isTemporary(const OfflinePageClientPolicy& policy) { | 21 bool isTemporary(const OfflinePageClientPolicy& policy) { |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 controller()->GetPolicy(kNTPSuggestionsNamespace); | 141 controller()->GetPolicy(kNTPSuggestionsNamespace); |
| 142 EXPECT_EQ(policy.name_space, kNTPSuggestionsNamespace); | 142 EXPECT_EQ(policy.name_space, kNTPSuggestionsNamespace); |
| 143 EXPECT_FALSE(isTemporary(policy)); | 143 EXPECT_FALSE(isTemporary(policy)); |
| 144 EXPECT_TRUE(controller()->IsRemovedOnCacheReset(kNTPSuggestionsNamespace)); | 144 EXPECT_TRUE(controller()->IsRemovedOnCacheReset(kNTPSuggestionsNamespace)); |
| 145 ExpectDownloadSupport(kNTPSuggestionsNamespace, true); | 145 ExpectDownloadSupport(kNTPSuggestionsNamespace, true); |
| 146 ExpectRecentTab(kNTPSuggestionsNamespace, false); | 146 ExpectRecentTab(kNTPSuggestionsNamespace, false); |
| 147 ExpectOnlyOriginalTab(kNTPSuggestionsNamespace, false); | 147 ExpectOnlyOriginalTab(kNTPSuggestionsNamespace, false); |
| 148 } | 148 } |
| 149 | 149 |
| 150 } // namespace offline_pages | 150 } // namespace offline_pages |
| OLD | NEW |