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

Side by Side Diff: ios/chrome/browser/reading_list/reading_list_model_factory.cc

Issue 2763233003: Move ReadingList model to components/reading_list/core (Closed)
Patch Set: feedback Created 3 years, 9 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 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 "ios/chrome/browser/reading_list/reading_list_model_factory.h" 5 #include "ios/chrome/browser/reading_list/reading_list_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/ptr_util.h" 10 #include "base/memory/ptr_util.h"
11 #include "base/memory/singleton.h" 11 #include "base/memory/singleton.h"
12 #include "base/time/default_clock.h" 12 #include "base/time/default_clock.h"
13 #include "components/browser_sync/profile_sync_service.h" 13 #include "components/browser_sync/profile_sync_service.h"
14 #include "components/keyed_service/ios/browser_state_dependency_manager.h" 14 #include "components/keyed_service/ios/browser_state_dependency_manager.h"
15 #include "components/pref_registry/pref_registry_syncable.h" 15 #include "components/pref_registry/pref_registry_syncable.h"
16 #include "components/reading_list/core/reading_list_model_impl.h"
17 #include "components/reading_list/core/reading_list_pref_names.h"
18 #include "components/reading_list/core/reading_list_store.h"
16 #include "components/reading_list/core/reading_list_switches.h" 19 #include "components/reading_list/core/reading_list_switches.h"
17 #include "components/reading_list/ios/reading_list_model_impl.h"
18 #include "components/reading_list/ios/reading_list_pref_names.h"
19 #include "components/reading_list/ios/reading_list_store.h"
20 #include "components/sync/base/report_unrecoverable_error.h" 20 #include "components/sync/base/report_unrecoverable_error.h"
21 #include "ios/chrome/browser/browser_state/browser_state_otr_helper.h" 21 #include "ios/chrome/browser/browser_state/browser_state_otr_helper.h"
22 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" 22 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
23 #include "ios/chrome/browser/experimental_flags.h" 23 #include "ios/chrome/browser/experimental_flags.h"
24 #include "ios/chrome/common/channel_info.h" 24 #include "ios/chrome/common/channel_info.h"
25 #include "ios/web/public/web_thread.h" 25 #include "ios/web/public/web_thread.h"
26 26
27 // static 27 // static
28 bool ReadingListModelFactory::IsReadingListEnabled() { 28 bool ReadingListModelFactory::IsReadingListEnabled() {
29 return reading_list::switches::IsReadingListEnabled(); 29 return reading_list::switches::IsReadingListEnabled();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 base::MakeUnique<ReadingListModelImpl>( 81 base::MakeUnique<ReadingListModelImpl>(
82 std::move(store), chrome_browser_state->GetPrefs(), 82 std::move(store), chrome_browser_state->GetPrefs(),
83 base::MakeUnique<base::DefaultClock>()); 83 base::MakeUnique<base::DefaultClock>());
84 return reading_list_model; 84 return reading_list_model;
85 } 85 }
86 86
87 web::BrowserState* ReadingListModelFactory::GetBrowserStateToUse( 87 web::BrowserState* ReadingListModelFactory::GetBrowserStateToUse(
88 web::BrowserState* context) const { 88 web::BrowserState* context) const {
89 return GetBrowserStateRedirectedInIncognito(context); 89 return GetBrowserStateRedirectedInIncognito(context);
90 } 90 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698