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

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

Issue 1966723002: [Offline pages] Disabling offline pages in incognito (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding a TODO 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
« no previous file with comments | « chrome/browser/android/offline_pages/offline_page_model_factory.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/offline_page_model_factory.h" 5 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
11 #include "base/path_service.h"
12 #include "base/sequenced_task_runner.h" 11 #include "base/sequenced_task_runner.h"
13 #include "chrome/browser/profiles/incognito_helpers.h" 12 #include "chrome/browser/profiles/incognito_helpers.h"
14 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/common/chrome_constants.h" 14 #include "chrome/common/chrome_constants.h"
16 #include "components/keyed_service/content/browser_context_dependency_manager.h" 15 #include "components/keyed_service/content/browser_context_dependency_manager.h"
17 #include "components/offline_pages/offline_page_metadata_store_sql.h" 16 #include "components/offline_pages/offline_page_metadata_store_sql.h"
18 #include "components/offline_pages/offline_page_model.h" 17 #include "components/offline_pages/offline_page_model.h"
19 #include "components/offline_pages/proto/offline_pages.pb.h" 18 #include "components/offline_pages/proto/offline_pages.pb.h"
20 #include "content/public/browser/browser_thread.h" 19 #include "content/public/browser/browser_thread.h"
21 20
(...skipping 29 matching lines...) Expand all
51 std::unique_ptr<OfflinePageMetadataStore> metadata_store( 50 std::unique_ptr<OfflinePageMetadataStore> metadata_store(
52 new OfflinePageMetadataStoreSQL(background_task_runner, store_path)); 51 new OfflinePageMetadataStoreSQL(background_task_runner, store_path));
53 52
54 base::FilePath archives_dir = 53 base::FilePath archives_dir =
55 profile->GetPath().Append(chrome::kOfflinePageArchviesDirname); 54 profile->GetPath().Append(chrome::kOfflinePageArchviesDirname);
56 55
57 return new OfflinePageModel(std::move(metadata_store), archives_dir, 56 return new OfflinePageModel(std::move(metadata_store), archives_dir,
58 background_task_runner); 57 background_task_runner);
59 } 58 }
60 59
61 content::BrowserContext* OfflinePageModelFactory::GetBrowserContextToUse(
62 content::BrowserContext* context) const {
63 return chrome::GetBrowserContextRedirectedInIncognito(context);
64 }
65
66 } // namespace offline_pages 60 } // namespace offline_pages
67 61
OLDNEW
« no previous file with comments | « chrome/browser/android/offline_pages/offline_page_model_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698