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

Side by Side Diff: chrome/browser/printing/print_system_task_proxy.cc

Issue 11428058: Don't return false if PRINTER_INFO_9 is not available. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | printing/backend/print_backend_win.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/printing/print_system_task_proxy.h" 5 #include "chrome/browser/printing/print_system_task_proxy.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // failed to get capabilities. 120 // failed to get capabilities.
121 BrowserThread::PostTask( 121 BrowserThread::PostTask(
122 BrowserThread::UI, FROM_HERE, 122 BrowserThread::UI, FROM_HERE,
123 base::Bind(&PrintSystemTaskProxy::SendFailedToGetPrinterCapabilities, 123 base::Bind(&PrintSystemTaskProxy::SendFailedToGetPrinterCapabilities,
124 this, printer_name)); 124 this, printer_name));
125 return; 125 return;
126 } 126 }
127 127
128 printing::PrinterSemanticCapsAndDefaults info; 128 printing::PrinterSemanticCapsAndDefaults info;
129 if (!print_backend_->GetPrinterSemanticCapsAndDefaults(printer_name, &info)) { 129 if (!print_backend_->GetPrinterSemanticCapsAndDefaults(printer_name, &info)) {
130 VLOG(1) << "Failed to get capabilities for " << printer_name; 130 LOG(WARNING) << "Failed to get capabilities for " << printer_name;
131 BrowserThread::PostTask( 131 BrowserThread::PostTask(
132 BrowserThread::UI, FROM_HERE, 132 BrowserThread::UI, FROM_HERE,
133 base::Bind(&PrintSystemTaskProxy::SendFailedToGetPrinterCapabilities, 133 base::Bind(&PrintSystemTaskProxy::SendFailedToGetPrinterCapabilities,
134 this, printer_name)); 134 this, printer_name));
135 return; 135 return;
136 } 136 }
137 137
138 DictionaryValue settings_info; 138 DictionaryValue settings_info;
139 settings_info.SetString(kPrinterId, printer_name); 139 settings_info.SetString(kPrinterId, printer_name);
140 settings_info.SetBoolean(kDisableColorOption, !info.color_capable); 140 settings_info.SetBoolean(kDisableColorOption, !info.color_capable);
(...skipping 24 matching lines...) Expand all
165 if (handler_) 165 if (handler_)
166 handler_->SendPrinterCapabilities(*settings_info); 166 handler_->SendPrinterCapabilities(*settings_info);
167 delete settings_info; 167 delete settings_info;
168 } 168 }
169 169
170 void PrintSystemTaskProxy::SendFailedToGetPrinterCapabilities( 170 void PrintSystemTaskProxy::SendFailedToGetPrinterCapabilities(
171 const std::string& printer_name) { 171 const std::string& printer_name) {
172 if (handler_) 172 if (handler_)
173 handler_->SendFailedToGetPrinterCapabilities(printer_name); 173 handler_->SendFailedToGetPrinterCapabilities(printer_name);
174 } 174 }
OLDNEW
« no previous file with comments | « no previous file | printing/backend/print_backend_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698