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

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

Issue 2232573002: Fix uninitialized fields in Printer::PPDFile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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_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
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "chromeos/chromeos_export.h" 12 #include "chromeos/chromeos_export.h"
13 13
14 namespace chromeos { 14 namespace chromeos {
15 15
16 class CHROMEOS_EXPORT Printer { 16 class CHROMEOS_EXPORT Printer {
17 public: 17 public:
18 // Represents a Postscript Printer Description with which the printer was 18 // Represents a Postscript Printer Description with which the printer was
19 // setup. 19 // setup.
20 struct PPDFile { 20 struct PPDFile {
21 // Identifier from the quirks server. -1 otherwise. 21 // Identifier from the quirks server. -1 otherwise.
22 int id; 22 int id = -1;
23 23
24 std::string file_name; 24 std::string file_name;
25 25
26 // If there is a file with a later version on the quirks server, that file 26 // If there is a file with a later version on the quirks server, that file
27 // should be used. The default value is 0. 27 // should be used. The default value is 0.
28 int version_number; 28 int version_number = 0;
29 29
30 // This will be true if the file was retrived from the quirks server. 30 // This will be true if the file was retrived from the quirks server.
31 // Otherwise, the file was saved to disk by the user. 31 // Otherwise, the file was saved to disk by the user.
32 bool from_quirks_server; 32 bool from_quirks_server = false;
33 }; 33 };
34 34
35 // Constructs a printer object that is completely empty. 35 // Constructs a printer object that is completely empty.
36 Printer(); 36 Printer();
37 37
38 // Constructs a printer object with an id. 38 // Constructs a printer object with an id.
39 explicit Printer(const std::string& id); 39 explicit Printer(const std::string& id);
40 40
41 ~Printer(); 41 ~Printer();
42 42
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 // The UUID from an autoconf protocol for deduplication. Could be empty. 96 // The UUID from an autoconf protocol for deduplication. Could be empty.
97 std::string uuid_; 97 std::string uuid_;
98 98
99 DISALLOW_COPY_AND_ASSIGN(Printer); 99 DISALLOW_COPY_AND_ASSIGN(Printer);
100 }; 100 };
101 101
102 } // namespace chromeos 102 } // namespace chromeos
103 103
104 #endif // CHROMEOS_PRINTING_PRINTER_CONFIGURATION_H_ 104 #endif // CHROMEOS_PRINTING_PRINTER_CONFIGURATION_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