| Index: chrome/service/cloud_print/print_system_cups.cc
|
| diff --git a/chrome/service/cloud_print/print_system_cups.cc b/chrome/service/cloud_print/print_system_cups.cc
|
| index 19d6ddfae9bf6c1b28e4c6c7105500b8f7fe2cfc..132a252b1fced997d70c4d3c48fdf7a751062b0b 100644
|
| --- a/chrome/service/cloud_print/print_system_cups.cc
|
| +++ b/chrome/service/cloud_print/print_system_cups.cc
|
| @@ -76,26 +76,25 @@ class PrintSystemCUPS : public PrintSystem {
|
| explicit PrintSystemCUPS(const base::DictionaryValue* print_system_settings);
|
|
|
| // PrintSystem implementation.
|
| - virtual PrintSystemResult Init() override;
|
| - virtual PrintSystem::PrintSystemResult EnumeratePrinters(
|
| + PrintSystemResult Init() override;
|
| + PrintSystem::PrintSystemResult EnumeratePrinters(
|
| printing::PrinterList* printer_list) override;
|
| - virtual void GetPrinterCapsAndDefaults(
|
| + void GetPrinterCapsAndDefaults(
|
| const std::string& printer_name,
|
| const PrinterCapsAndDefaultsCallback& callback) override;
|
| - virtual bool IsValidPrinter(const std::string& printer_name) override;
|
| - virtual bool ValidatePrintTicket(
|
| - const std::string& printer_name,
|
| - const std::string& print_ticket_data,
|
| - const std::string& print_ticket_mime_type) override;
|
| - virtual bool GetJobDetails(const std::string& printer_name,
|
| - PlatformJobId job_id,
|
| - PrintJobDetails *job_details) override;
|
| - virtual PrintSystem::PrintServerWatcher* CreatePrintServerWatcher() override;
|
| - virtual PrintSystem::PrinterWatcher* CreatePrinterWatcher(
|
| + bool IsValidPrinter(const std::string& printer_name) override;
|
| + bool ValidatePrintTicket(const std::string& printer_name,
|
| + const std::string& print_ticket_data,
|
| + const std::string& print_ticket_mime_type) override;
|
| + bool GetJobDetails(const std::string& printer_name,
|
| + PlatformJobId job_id,
|
| + PrintJobDetails* job_details) override;
|
| + PrintSystem::PrintServerWatcher* CreatePrintServerWatcher() override;
|
| + PrintSystem::PrinterWatcher* CreatePrinterWatcher(
|
| const std::string& printer_name) override;
|
| - virtual PrintSystem::JobSpooler* CreateJobSpooler() override;
|
| - virtual bool UseCddAndCjt() override;
|
| - virtual std::string GetSupportedMimeTypes() override;
|
| + PrintSystem::JobSpooler* CreateJobSpooler() override;
|
| + bool UseCddAndCjt() override;
|
| + std::string GetSupportedMimeTypes() override;
|
|
|
| // Helper functions.
|
| PlatformJobId SpoolPrintJob(const std::string& print_ticket,
|
| @@ -126,7 +125,7 @@ class PrintSystemCUPS : public PrintSystem {
|
| }
|
|
|
| private:
|
| - virtual ~PrintSystemCUPS() {}
|
| + ~PrintSystemCUPS() override {}
|
|
|
| // Following functions are wrappers around corresponding CUPS functions.
|
| // <functions>2() are called when print server is specified, and plain
|
| @@ -180,7 +179,7 @@ class PrintServerWatcherCUPS
|
| }
|
|
|
| // PrintSystem::PrintServerWatcher implementation.
|
| - virtual bool StartWatching(
|
| + bool StartWatching(
|
| PrintSystem::PrintServerWatcher::Delegate* delegate) override {
|
| delegate_ = delegate;
|
| printers_hash_ = GetPrintersHash();
|
| @@ -191,7 +190,7 @@ class PrintServerWatcherCUPS
|
| return true;
|
| }
|
|
|
| - virtual bool StopWatching() override {
|
| + bool StopWatching() override {
|
| delegate_ = NULL;
|
| return true;
|
| }
|
| @@ -212,9 +211,7 @@ class PrintServerWatcherCUPS
|
| }
|
|
|
| protected:
|
| - virtual ~PrintServerWatcherCUPS() {
|
| - StopWatching();
|
| - }
|
| + ~PrintServerWatcherCUPS() override { StopWatching(); }
|
|
|
| private:
|
| std::string GetPrintersHash() {
|
| @@ -253,8 +250,7 @@ class PrinterWatcherCUPS
|
| }
|
|
|
| // PrintSystem::PrinterWatcher implementation.
|
| - virtual bool StartWatching(
|
| - PrintSystem::PrinterWatcher::Delegate* delegate) override{
|
| + bool StartWatching(PrintSystem::PrinterWatcher::Delegate* delegate) override {
|
| scoped_refptr<printing::PrintBackend> print_backend(
|
| printing::PrintBackend::CreateInstance(NULL));
|
| crash_keys::ScopedPrinterInfo crash_key(
|
| @@ -277,12 +273,12 @@ class PrinterWatcherCUPS
|
| return true;
|
| }
|
|
|
| - virtual bool StopWatching() override{
|
| + bool StopWatching() override {
|
| delegate_ = NULL;
|
| return true;
|
| }
|
|
|
| - virtual bool GetCurrentPrinterInfo(
|
| + bool GetCurrentPrinterInfo(
|
| printing::PrinterBasicInfo* printer_info) override {
|
| DCHECK(printer_info);
|
| return print_system_->GetPrinterInfo(printer_name_, printer_info);
|
| @@ -328,9 +324,7 @@ class PrinterWatcherCUPS
|
| }
|
|
|
| protected:
|
| - virtual ~PrinterWatcherCUPS() {
|
| - StopWatching();
|
| - }
|
| + ~PrinterWatcherCUPS() override { StopWatching(); }
|
|
|
| private:
|
| std::string GetSettingsHash() {
|
| @@ -373,14 +367,14 @@ class JobSpoolerCUPS : public PrintSystem::JobSpooler {
|
| }
|
|
|
| // PrintSystem::JobSpooler implementation.
|
| - virtual bool Spool(const std::string& print_ticket,
|
| - const std::string& print_ticket_mime_type,
|
| - const base::FilePath& print_data_file_path,
|
| - const std::string& print_data_mime_type,
|
| - const std::string& printer_name,
|
| - const std::string& job_title,
|
| - const std::vector<std::string>& tags,
|
| - JobSpooler::Delegate* delegate) override{
|
| + bool Spool(const std::string& print_ticket,
|
| + const std::string& print_ticket_mime_type,
|
| + const base::FilePath& print_data_file_path,
|
| + const std::string& print_data_mime_type,
|
| + const std::string& printer_name,
|
| + const std::string& job_title,
|
| + const std::vector<std::string>& tags,
|
| + JobSpooler::Delegate* delegate) override {
|
| DCHECK(delegate);
|
| bool dry_run = false;
|
| int job_id = print_system_->SpoolPrintJob(
|
| @@ -401,7 +395,7 @@ class JobSpoolerCUPS : public PrintSystem::JobSpooler {
|
| }
|
|
|
| protected:
|
| - virtual ~JobSpoolerCUPS() {}
|
| + ~JobSpoolerCUPS() override {}
|
|
|
| private:
|
| scoped_refptr<PrintSystemCUPS> print_system_;
|
|
|