OLD | NEW |
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/ui/webui/print_preview/print_preview_handler.h" | 5 #include "chrome/browser/ui/webui/print_preview/print_preview_handler.h" |
6 | 6 |
7 #include <ctype.h> | 7 #include <ctype.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 | 429 |
430 printer_info->Set(printing::kSettingPrinterOptions, std::move(options)); | 430 printer_info->Set(printing::kSettingPrinterOptions, std::move(options)); |
431 | 431 |
432 printers->Append(std::move(printer_info)); | 432 printers->Append(std::move(printer_info)); |
433 | 433 |
434 VLOG(1) << "Found printer " << printer_name << " with device name " | 434 VLOG(1) << "Found printer " << printer_name << " with device name " |
435 << printer.printer_name; | 435 << printer.printer_name; |
436 } | 436 } |
437 } | 437 } |
438 | 438 |
439 base::LazyInstance<printing::StickySettings> g_sticky_settings = | 439 base::LazyInstance<printing::StickySettings>::DestructorAtExit |
440 LAZY_INSTANCE_INITIALIZER; | 440 g_sticky_settings = LAZY_INSTANCE_INITIALIZER; |
441 | 441 |
442 printing::StickySettings* GetStickySettings() { | 442 printing::StickySettings* GetStickySettings() { |
443 return g_sticky_settings.Pointer(); | 443 return g_sticky_settings.Pointer(); |
444 } | 444 } |
445 | 445 |
446 // Returns a unique path for |path|, just like with downloads. | 446 // Returns a unique path for |path|, just like with downloads. |
447 base::FilePath GetUniquePath(const base::FilePath& path) { | 447 base::FilePath GetUniquePath(const base::FilePath& path) { |
448 base::FilePath unique_path = path; | 448 base::FilePath unique_path = path; |
449 int uniquifier = | 449 int uniquifier = |
450 base::GetUniquePathNumber(path, base::FilePath::StringType()); | 450 base::GetUniquePathNumber(path, base::FilePath::StringType()); |
(...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1794 | 1794 |
1795 void PrintPreviewHandler::UnregisterForGaiaCookieChanges() { | 1795 void PrintPreviewHandler::UnregisterForGaiaCookieChanges() { |
1796 if (gaia_cookie_manager_service_) | 1796 if (gaia_cookie_manager_service_) |
1797 gaia_cookie_manager_service_->RemoveObserver(this); | 1797 gaia_cookie_manager_service_->RemoveObserver(this); |
1798 } | 1798 } |
1799 | 1799 |
1800 void PrintPreviewHandler::SetPdfSavedClosureForTesting( | 1800 void PrintPreviewHandler::SetPdfSavedClosureForTesting( |
1801 const base::Closure& closure) { | 1801 const base::Closure& closure) { |
1802 pdf_file_saved_closure_ = closure; | 1802 pdf_file_saved_closure_ = closure; |
1803 } | 1803 } |
OLD | NEW |