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

Unified Diff: chrome/browser/chromeos/printing/ppd_provider_factory.cc

Issue 2613683004: Completely rewrite the PpdProvider/PpdCache to use the SCS backend. Along the way, clean it up a l… (Closed)
Patch Set: Address michealpg@ comments Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/printing/ppd_provider_factory.cc
diff --git a/chrome/browser/chromeos/printing/ppd_provider_factory.cc b/chrome/browser/chromeos/printing/ppd_provider_factory.cc
index 4c06d9a7f3e72ecc17b9d737d103dbe18297a65e..644ddc1325274ef0b64e6a537532592cfc098866 100644
--- a/chrome/browser/chromeos/printing/ppd_provider_factory.cc
+++ b/chrome/browser/chromeos/printing/ppd_provider_factory.cc
@@ -18,15 +18,20 @@
namespace chromeos {
namespace printing {
-std::unique_ptr<PpdProvider> CreateProvider(Profile* profile) {
+scoped_refptr<PpdProvider> CreateProvider(Profile* profile) {
base::FilePath ppd_cache_path =
profile->GetPath().Append(FILE_PATH_LITERAL("PPDCache"));
- return PpdProvider::Create(google_apis::GetAPIKey(),
- g_browser_process->system_request_context(),
+ auto cache = PpdCache::Create(ppd_cache_path,
+ content::BrowserThread::GetTaskRunnerForThread(
+ content::BrowserThread::CACHE)
+ .get());
+
+ return PpdProvider::Create(g_browser_process->GetApplicationLocale(),
+ g_browser_process->system_request_context(), cache,
content::BrowserThread::GetTaskRunnerForThread(
- content::BrowserThread::FILE),
- PpdCache::Create(ppd_cache_path));
+ content::BrowserThread::FILE)
+ .get());
}
} // namespace printing
« no previous file with comments | « chrome/browser/chromeos/printing/ppd_provider_factory.h ('k') | chrome/browser/chromeos/printing/specifics_translation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698