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

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

Issue 2459943002: Use printer id to populate CUPS instead of printer name. (Closed)
Patch Set: rebase Created 4 years, 1 month 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 | « chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc ('k') | no next file » | 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 #include "chromeos/printing/printer_configuration.h" 5 #include "chromeos/printing/printer_configuration.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/guid.h"
10
9 namespace chromeos { 11 namespace chromeos {
10 12
11 Printer::Printer() {} 13 Printer::Printer() {
14 id_ = base::GenerateGUID();
15 }
12 16
13 Printer::Printer(const std::string& id) : id_(id) {} 17 Printer::Printer(const std::string& id) : id_(id) {
18 if (id_.empty())
19 id_ = base::GenerateGUID();
20 }
14 21
15 Printer::Printer(const Printer& other) = default; 22 Printer::Printer(const Printer& other) = default;
16 23
17 Printer& Printer::operator=(const Printer& other) = default; 24 Printer& Printer::operator=(const Printer& other) = default;
18 25
19 Printer::~Printer() {} 26 Printer::~Printer() {}
20 27
21 } // namespace chromeos 28 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698