Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Side by Side Diff: components/offline_pages/core/offline_page_storage_manager.cc

Issue 2489443002: Move all components/offline_pages/ files into component/offline_pages/core (Closed)
Patch Set: rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/offline_page_storage_manager.h" 5 #include "components/offline_pages/core/offline_page_storage_manager.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/clock.h" 10 #include "base/time/clock.h"
11 #include "base/time/default_clock.h" 11 #include "base/time/default_clock.h"
12 #include "components/offline_pages/client_policy_controller.h" 12 #include "components/offline_pages/core/client_policy_controller.h"
13 #include "components/offline_pages/offline_page_client_policy.h" 13 #include "components/offline_pages/core/offline_page_client_policy.h"
14 #include "components/offline_pages/offline_page_item.h" 14 #include "components/offline_pages/core/offline_page_item.h"
15 #include "components/offline_pages/offline_page_model.h" 15 #include "components/offline_pages/core/offline_page_model.h"
16 16
17 using LifetimeType = offline_pages::LifetimePolicy::LifetimeType; 17 using LifetimeType = offline_pages::LifetimePolicy::LifetimeType;
18 18
19 namespace offline_pages { 19 namespace offline_pages {
20 20
21 constexpr double constants::kOfflinePageStorageLimit; 21 constexpr double constants::kOfflinePageStorageLimit;
22 constexpr double constants::kOfflinePageStorageClearThreshold; 22 constexpr double constants::kOfflinePageStorageClearThreshold;
23 constexpr base::TimeDelta constants::kClearStorageInterval; 23 constexpr base::TimeDelta constants::kClearStorageInterval;
24 constexpr base::TimeDelta constants::kRemovePageItemInterval; 24 constexpr base::TimeDelta constants::kRemovePageItemInterval;
25 25
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 policy_controller_->GetPolicy(page.client_id.name_space).lifetime_policy; 186 policy_controller_->GetPolicy(page.client_id.name_space).lifetime_policy;
187 return policy.lifetime_type == LifetimeType::TEMPORARY && 187 return policy.lifetime_type == LifetimeType::TEMPORARY &&
188 clear_time_ - page.last_access_time >= policy.expiration_period; 188 clear_time_ - page.last_access_time >= policy.expiration_period;
189 } 189 }
190 190
191 bool OfflinePageStorageManager::IsInProgress() const { 191 bool OfflinePageStorageManager::IsInProgress() const {
192 return clear_time_ > last_clear_time_; 192 return clear_time_ > last_clear_time_;
193 } 193 }
194 194
195 } // namespace offline_pages 195 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698