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

Side by Side Diff: chrome/browser/android/offline_pages/test_offline_page_model_builder.cc

Issue 1928393003: Using separate directories based on LifetimeType. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months 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 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/offline_pages/test_offline_page_model_builder.h " 5 #include "chrome/browser/android/offline_pages/test_offline_page_model_builder.h "
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
11 #include "base/thread_task_runner_handle.h" 11 #include "base/thread_task_runner_handle.h"
12 #include "chrome/common/chrome_constants.h" 12 #include "chrome/common/chrome_constants.h"
13 #include "components/offline_pages/offline_page_model.h" 13 #include "components/offline_pages/offline_page_model.h"
14 #include "components/offline_pages/offline_page_test_store.h" 14 #include "components/offline_pages/offline_page_test_store.h"
15 #include "content/public/browser/browser_context.h" 15 #include "content/public/browser/browser_context.h"
16 16
17 using LifetimeType = offline_pages::LifetimePolicy::LifetimeType;
18
17 namespace offline_pages { 19 namespace offline_pages {
18 20
19 std::unique_ptr<KeyedService> BuildTestOfflinePageModel( 21 std::unique_ptr<KeyedService> BuildTestOfflinePageModel(
20 content::BrowserContext* context) { 22 content::BrowserContext* context) {
21 scoped_refptr<base::SingleThreadTaskRunner> task_runner = 23 scoped_refptr<base::SingleThreadTaskRunner> task_runner =
22 base::ThreadTaskRunnerHandle::Get(); 24 base::ThreadTaskRunnerHandle::Get();
23 25
24 std::unique_ptr<OfflinePageTestStore> metadata_store( 26 std::unique_ptr<OfflinePageTestStore> metadata_store(
25 new OfflinePageTestStore(task_runner)); 27 new OfflinePageTestStore(task_runner));
26 28
27 base::FilePath archives_dir = 29 base::FilePath archives_dir =
28 context->GetPath().Append(chrome::kOfflinePageArchviesDirname); 30 context->GetPath().Append(chrome::kOfflinePageArchivesDirname);
29 31
30 return std::unique_ptr<KeyedService>(new OfflinePageModel( 32 return std::unique_ptr<KeyedService>(new OfflinePageModel(
31 std::move(metadata_store), archives_dir, task_runner)); 33 std::move(metadata_store), archives_dir, task_runner));
32 } 34 }
33 35
34 } // namespace offline_pages 36 } // namespace offline_pages
OLDNEW
« no previous file with comments | « chrome/browser/android/offline_pages/offline_page_utils_unittest.cc ('k') | chrome/browser/net/chrome_network_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698