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

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: Plumb through rest of changes, address skau comments. Created 3 years, 11 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..313de15850e36085390aeb2ae5926d8937e37439 100644
--- a/chrome/browser/chromeos/printing/ppd_provider_factory.cc
+++ b/chrome/browser/chromeos/printing/ppd_provider_factory.cc
@@ -18,15 +18,18 @@
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(),
+ 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(),
- content::BrowserThread::GetTaskRunnerForThread(
- content::BrowserThread::FILE),
- PpdCache::Create(ppd_cache_path));
+ cache);
}
} // namespace printing

Powered by Google App Engine
This is Rietveld 408576698