| 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 "chromeos/printing/ppd_provider.h" | 5 #include "chromeos/printing/ppd_provider.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <unordered_map> | 10 #include <unordered_map> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 #include "chromeos/printing/ppd_cache.h" | 33 #include "chromeos/printing/ppd_cache.h" |
| 34 #include "chromeos/printing/printing_constants.h" | 34 #include "chromeos/printing/printing_constants.h" |
| 35 #include "net/base/load_flags.h" | 35 #include "net/base/load_flags.h" |
| 36 #include "net/http/http_status_code.h" | 36 #include "net/http/http_status_code.h" |
| 37 #include "net/url_request/url_fetcher.h" | 37 #include "net/url_request/url_fetcher.h" |
| 38 #include "net/url_request/url_fetcher_delegate.h" | 38 #include "net/url_request/url_fetcher_delegate.h" |
| 39 #include "net/url_request/url_request_context_getter.h" | 39 #include "net/url_request/url_request_context_getter.h" |
| 40 #include "url/gurl.h" | 40 #include "url/gurl.h" |
| 41 | 41 |
| 42 namespace chromeos { | 42 namespace chromeos { |
| 43 namespace printing { | |
| 44 namespace { | 43 namespace { |
| 45 | 44 |
| 46 // Extract cupsFilter/cupsFilter2 filter names from the contents | 45 // Extract cupsFilter/cupsFilter2 filter names from the contents |
| 47 // of a ppd, pre-split into lines. | 46 // of a ppd, pre-split into lines. |
| 48 | 47 |
| 49 // cupsFilter2 lines look like this: | 48 // cupsFilter2 lines look like this: |
| 50 // | 49 // |
| 51 // *cupsFilter2: "application/vnd.cups-raster application/vnd.foo 100 | 50 // *cupsFilter2: "application/vnd.cups-raster application/vnd.foo 100 |
| 52 // rastertofoo" | 51 // rastertofoo" |
| 53 // | 52 // |
| (...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1013 | 1012 |
| 1014 // static | 1013 // static |
| 1015 scoped_refptr<PpdProvider> PpdProvider::Create( | 1014 scoped_refptr<PpdProvider> PpdProvider::Create( |
| 1016 const std::string& browser_locale, | 1015 const std::string& browser_locale, |
| 1017 scoped_refptr<net::URLRequestContextGetter> url_context_getter, | 1016 scoped_refptr<net::URLRequestContextGetter> url_context_getter, |
| 1018 scoped_refptr<PpdCache> ppd_cache, | 1017 scoped_refptr<PpdCache> ppd_cache, |
| 1019 const PpdProvider::Options& options) { | 1018 const PpdProvider::Options& options) { |
| 1020 return scoped_refptr<PpdProvider>(new PpdProviderImpl( | 1019 return scoped_refptr<PpdProvider>(new PpdProviderImpl( |
| 1021 browser_locale, url_context_getter, ppd_cache, options)); | 1020 browser_locale, url_context_getter, ppd_cache, options)); |
| 1022 } | 1021 } |
| 1023 } // namespace printing | |
| 1024 } // namespace chromeos | 1022 } // namespace chromeos |
| OLD | NEW |