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

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

Issue 2956173002: Introduce the field make_and_model for synced printers. (Closed)
Patch Set: done Created 3 years, 5 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
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_CONFIGURATION_H_ 5 #ifndef CHROMEOS_PRINTING_PRINTER_CONFIGURATION_H_
6 #define CHROMEOS_PRINTING_PRINTER_CONFIGURATION_H_ 6 #define CHROMEOS_PRINTING_PRINTER_CONFIGURATION_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 const std::string& display_name() const { return display_name_; } 80 const std::string& display_name() const { return display_name_; }
81 void set_display_name(const std::string& display_name) { 81 void set_display_name(const std::string& display_name) {
82 display_name_ = display_name; 82 display_name_ = display_name;
83 } 83 }
84 84
85 const std::string& description() const { return description_; } 85 const std::string& description() const { return description_; }
86 void set_description(const std::string& description) { 86 void set_description(const std::string& description) {
87 description_ = description; 87 description_ = description;
88 } 88 }
89 89
90 // Returns the |manufacturer| of the printer.
91 // DEPRECATED(skau@chromium.org): Use make_and_model() instead.
90 const std::string& manufacturer() const { return manufacturer_; } 92 const std::string& manufacturer() const { return manufacturer_; }
91 void set_manufacturer(const std::string& manufacturer) { 93 void set_manufacturer(const std::string& manufacturer) {
92 manufacturer_ = manufacturer; 94 manufacturer_ = manufacturer;
93 } 95 }
94 96
97 // Returns the |model| of the printer.
98 // DEPRECATED(skau@chromium.org): Use make_and_model() instead.
95 const std::string& model() const { return model_; } 99 const std::string& model() const { return model_; }
96 void set_model(const std::string& model) { model_ = model; } 100 void set_model(const std::string& model) { model_ = model; }
97 101
102 const std::string& make_and_model() const { return make_and_model_; }
103 void set_make_and_model(const std::string& make_and_model) {
104 make_and_model_ = make_and_model;
105 }
106
98 const std::string& uri() const { return uri_; } 107 const std::string& uri() const { return uri_; }
99 void set_uri(const std::string& uri) { uri_ = uri; } 108 void set_uri(const std::string& uri) { uri_ = uri; }
100 109
101 const PpdReference& ppd_reference() const { return ppd_reference_; } 110 const PpdReference& ppd_reference() const { return ppd_reference_; }
102 PpdReference* mutable_ppd_reference() { return &ppd_reference_; } 111 PpdReference* mutable_ppd_reference() { return &ppd_reference_; }
103 112
104 const std::string& uuid() const { return uuid_; } 113 const std::string& uuid() const { return uuid_; }
105 void set_uuid(const std::string& uuid) { uuid_ = uuid; } 114 void set_uuid(const std::string& uuid) { uuid_ = uuid; }
106 115
107 // Returns true if the printer should be automatically configured using 116 // Returns true if the printer should be automatically configured using
(...skipping 15 matching lines...) Expand all
123 // Globally unique identifier. Empty indicates a new printer. 132 // Globally unique identifier. Empty indicates a new printer.
124 std::string id_; 133 std::string id_;
125 134
126 // User defined string for printer identification. 135 // User defined string for printer identification.
127 std::string display_name_; 136 std::string display_name_;
128 137
129 // User defined string for additional printer information. 138 // User defined string for additional printer information.
130 std::string description_; 139 std::string description_;
131 140
132 // The manufacturer of the printer, e.g. HP 141 // The manufacturer of the printer, e.g. HP
142 // DEPRECATED(skau@chromium.org): Migrating to make_and_model. This is kept
143 // for backward compatibility until migration is complete.
133 std::string manufacturer_; 144 std::string manufacturer_;
134 145
135 // The model of the printer, e.g. OfficeJet 415 146 // The model of the printer, e.g. OfficeJet 415
147 // DEPRECATED(skau@chromium.org): Migrating to make_and_model. This is kept
148 // for backward compatibility until migration is complete.
136 std::string model_; 149 std::string model_;
137 150
151 // The manufactuer and model of the printer in one string. e.g. HP OfficeJet
152 // 415.
153 std::string make_and_model_;
154
138 // The full path for the printer. Suitable for configuration in CUPS. 155 // The full path for the printer. Suitable for configuration in CUPS.
139 // Contains protocol, hostname, port, and queue. 156 // Contains protocol, hostname, port, and queue.
140 std::string uri_; 157 std::string uri_;
141 158
142 // How to find the associated postscript printer description. 159 // How to find the associated postscript printer description.
143 PpdReference ppd_reference_; 160 PpdReference ppd_reference_;
144 161
145 // The UUID from an autoconf protocol for deduplication. Could be empty. 162 // The UUID from an autoconf protocol for deduplication. Could be empty.
146 std::string uuid_; 163 std::string uuid_;
147 164
148 // The datastore which holds this printer. 165 // The datastore which holds this printer.
149 Source source_; 166 Source source_;
150 167
151 // Timestamp of most recent change. 168 // Timestamp of most recent change.
152 base::Time last_updated_; 169 base::Time last_updated_;
153 }; 170 };
154 171
155 } // namespace chromeos 172 } // namespace chromeos
156 173
157 #endif // CHROMEOS_PRINTING_PRINTER_CONFIGURATION_H_ 174 #endif // CHROMEOS_PRINTING_PRINTER_CONFIGURATION_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/printing/specifics_translation_unittest.cc ('k') | chromeos/printing/printer_translator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698