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

Side by Side Diff: printing/backend/print_backend_cups.cc

Issue 12286020: Replace FilePath with base::FilePath. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/shared_impl/file_path.cc ('k') | remoting/base/resources.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 "printing/backend/print_backend.h" 5 #include "printing/backend/print_backend.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include <dlfcn.h> 9 #include <dlfcn.h>
10 #include <errno.h> 10 #include <errno.h>
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 int PrintBackendCUPS::GetDests(cups_dest_t** dests) { 320 int PrintBackendCUPS::GetDests(cups_dest_t** dests) {
321 if (print_server_url_.is_empty()) { // Use default (local) print server. 321 if (print_server_url_.is_empty()) { // Use default (local) print server.
322 return cupsGetDests(dests); 322 return cupsGetDests(dests);
323 } else { 323 } else {
324 HttpConnectionCUPS http(print_server_url_, cups_encryption_); 324 HttpConnectionCUPS http(print_server_url_, cups_encryption_);
325 http.SetBlocking(blocking_); 325 http.SetBlocking(blocking_);
326 return cupsGetDests2(http.http(), dests); 326 return cupsGetDests2(http.http(), dests);
327 } 327 }
328 } 328 }
329 329
330 FilePath PrintBackendCUPS::GetPPD(const char* name) { 330 base::FilePath PrintBackendCUPS::GetPPD(const char* name) {
331 // cupsGetPPD returns a filename stored in a static buffer in CUPS. 331 // cupsGetPPD returns a filename stored in a static buffer in CUPS.
332 // Protect this code with lock. 332 // Protect this code with lock.
333 CR_DEFINE_STATIC_LOCAL(base::Lock, ppd_lock, ()); 333 CR_DEFINE_STATIC_LOCAL(base::Lock, ppd_lock, ());
334 base::AutoLock ppd_autolock(ppd_lock); 334 base::AutoLock ppd_autolock(ppd_lock);
335 base::FilePath ppd_path; 335 base::FilePath ppd_path;
336 const char* ppd_file_path = NULL; 336 const char* ppd_file_path = NULL;
337 if (print_server_url_.is_empty()) { // Use default (local) print server. 337 if (print_server_url_.is_empty()) { // Use default (local) print server.
338 ppd_file_path = cupsGetPPD(name); 338 ppd_file_path = cupsGetPPD(name);
339 if (ppd_file_path) 339 if (ppd_file_path)
340 ppd_path = base::FilePath(ppd_file_path); 340 ppd_path = base::FilePath(ppd_file_path);
(...skipping 29 matching lines...) Expand all
370 << ", HTTP error: " << http_error; 370 << ", HTTP error: " << http_error;
371 file_util::Delete(ppd_path, false); 371 file_util::Delete(ppd_path, false);
372 ppd_path.clear(); 372 ppd_path.clear();
373 } 373 }
374 } 374 }
375 } 375 }
376 return ppd_path; 376 return ppd_path;
377 } 377 }
378 378
379 } // namespace printing 379 } // namespace printing
OLDNEW
« no previous file with comments | « ppapi/shared_impl/file_path.cc ('k') | remoting/base/resources.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698