OLD | NEW |
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 "chrome/browser/chromeos/printing/ppd_provider_factory.h" | 5 #include "chrome/browser/chromeos/printing/ppd_provider_factory.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
12 #include "chromeos/printing/ppd_cache.h" | 12 #include "chromeos/printing/ppd_cache.h" |
13 #include "chromeos/printing/ppd_provider.h" | 13 #include "chromeos/printing/ppd_provider.h" |
14 #include "google_apis/google_api_keys.h" | 14 #include "google_apis/google_api_keys.h" |
15 #include "net/url_request/url_request_context_getter.h" | 15 #include "net/url_request/url_request_context_getter.h" |
16 | 16 |
17 namespace chromeos { | 17 namespace chromeos { |
18 namespace printing { | |
19 | 18 |
20 scoped_refptr<PpdProvider> CreateProvider(Profile* profile) { | 19 scoped_refptr<PpdProvider> CreatePpdProvider(Profile* profile) { |
21 base::FilePath ppd_cache_path = | 20 base::FilePath ppd_cache_path = |
22 profile->GetPath().Append(FILE_PATH_LITERAL("PPDCache")); | 21 profile->GetPath().Append(FILE_PATH_LITERAL("PPDCache")); |
23 | 22 |
24 return PpdProvider::Create(g_browser_process->GetApplicationLocale(), | 23 return PpdProvider::Create(g_browser_process->GetApplicationLocale(), |
25 g_browser_process->system_request_context(), | 24 g_browser_process->system_request_context(), |
26 PpdCache::Create(ppd_cache_path)); | 25 PpdCache::Create(ppd_cache_path)); |
27 } | 26 } |
28 | 27 |
29 } // namespace printing | |
30 } // namespace chromeos | 28 } // namespace chromeos |
OLD | NEW |