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

Side by Side Diff: chrome/browser/ntp_snippets/ntp_snippets_service_factory.cc

Issue 2061803002: 📰 The Status card reports disabled sync states (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simplifyBridge
Patch Set: fix compilation: origins Created 4 years, 6 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/ntp_snippets/ntp_snippets_service_factory.h" 5 #include "chrome/browser/ntp_snippets/ntp_snippets_service_factory.h"
6 6
7 #include "base/feature_list.h" 7 #include "base/feature_list.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 base::FilePath database_dir( 102 base::FilePath database_dir(
103 profile->GetPath().Append(ntp_snippets::kDatabaseFolder)); 103 profile->GetPath().Append(ntp_snippets::kDatabaseFolder));
104 scoped_refptr<base::SequencedTaskRunner> task_runner = 104 scoped_refptr<base::SequencedTaskRunner> task_runner =
105 BrowserThread::GetBlockingPool() 105 BrowserThread::GetBlockingPool()
106 ->GetSequencedTaskRunnerWithShutdownBehavior( 106 ->GetSequencedTaskRunnerWithShutdownBehavior(
107 base::SequencedWorkerPool::GetSequenceToken(), 107 base::SequencedWorkerPool::GetSequenceToken(),
108 base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN); 108 base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN);
109 109
110 return new ntp_snippets::NTPSnippetsService( 110 return new ntp_snippets::NTPSnippetsService(
111 enabled, profile->GetPrefs(), sync_service, suggestions_service, 111 enabled, profile->GetPrefs(), signin_manager, sync_service,
112 g_browser_process->GetApplicationLocale(), scheduler, 112 suggestions_service, g_browser_process->GetApplicationLocale(), scheduler,
113 base::WrapUnique(new ntp_snippets::NTPSnippetsFetcher( 113 base::WrapUnique(new ntp_snippets::NTPSnippetsFetcher(
114 signin_manager, token_service, request_context, 114 signin_manager, token_service, request_context,
115 base::Bind(&safe_json::SafeJsonParser::Parse), 115 base::Bind(&safe_json::SafeJsonParser::Parse),
116 chrome::GetChannel() == version_info::Channel::STABLE)), 116 chrome::GetChannel() == version_info::Channel::STABLE)),
117 base::WrapUnique(new ImageFetcherImpl(request_context.get())), 117 base::WrapUnique(new ImageFetcherImpl(request_context.get())),
118 base::WrapUnique( 118 base::WrapUnique(
119 new ntp_snippets::NTPSnippetsDatabase(database_dir, task_runner))); 119 new ntp_snippets::NTPSnippetsDatabase(database_dir, task_runner)));
120 } 120 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698