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

Side by Side Diff: chromeos/printing/printer_translator.h

Issue 2795043003: Clean up printer preference handling. (Closed)
Patch Set: log missing fields Created 3 years, 8 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
« no previous file with comments | « no previous file | chromeos/printing/printer_translator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CHROMEOS_PRINTING_PRINTER_TRANSLATOR_H_ 5 #ifndef CHROMEOS_PRINTING_PRINTER_TRANSLATOR_H_
6 #define CHROMEOS_PRINTING_PRINTER_TRANSLATOR_H_ 6 #define CHROMEOS_PRINTING_PRINTER_TRANSLATOR_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "chromeos/chromeos_export.h" 10 #include "chromeos/chromeos_export.h"
11 #include "chromeos/printing/printer_configuration.h" 11 #include "chromeos/printing/printer_configuration.h"
12 12
13 namespace base { 13 namespace base {
14 class DictionaryValue; 14 class DictionaryValue;
15 } 15 }
16 16
17 namespace chromeos { 17 namespace chromeos {
18 namespace printing { 18 namespace printing {
19 19
20 CHROMEOS_EXPORT extern const char kPrinterId[]; 20 CHROMEOS_EXPORT extern const char kPrinterId[];
21 21
22 // Returns a new Printer populated with fields from |pref|. Returns a nullptr
23 // if |pref| does not contain an id field.
24 CHROMEOS_EXPORT std::unique_ptr<Printer> PrefToPrinter(
25 const base::DictionaryValue& pref);
26
27 // Returns a dictionary generated from the |printer| fields.
28 CHROMEOS_EXPORT std::unique_ptr<base::DictionaryValue> PrinterToPref(
29 const Printer& printer);
30
31 // Returns a new printer populated with the fields from |pref|. Processes 22 // Returns a new printer populated with the fields from |pref|. Processes
32 // dictionaries from policy i.e. cPanel. 23 // dictionaries from policy i.e. cPanel.
33 CHROMEOS_EXPORT std::unique_ptr<Printer> RecommendedPrinterToPrinter( 24 CHROMEOS_EXPORT std::unique_ptr<Printer> RecommendedPrinterToPrinter(
34 const base::DictionaryValue& pref); 25 const base::DictionaryValue& pref);
35 26
36 } // namespace printing 27 } // namespace printing
37 } // namespace chromeos 28 } // namespace chromeos
38 29
39 #endif // CHROMEOS_PRINTING_PRINTER_TRANSLATOR_H_ 30 #endif // CHROMEOS_PRINTING_PRINTER_TRANSLATOR_H_
OLDNEW
« no previous file with comments | « no previous file | chromeos/printing/printer_translator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698