diff options
Diffstat (limited to 'printing/custom_scaling.cc')
-rw-r--r-- | printing/custom_scaling.cc | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/printing/custom_scaling.cc b/printing/custom_scaling.cc deleted file mode 100644 index dead79c..0000000 --- a/printing/custom_scaling.cc +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "printing/custom_scaling.h" - -#include "base/threading/thread_local.h" - -namespace printing { - -static base::ThreadLocalPointer<double> gPrintingPageScale; - -bool GetCustomPrintingPageScale(double* scale) { - double* ptr = gPrintingPageScale.Get(); - if (ptr != NULL) { - *scale = *ptr; - } - return ptr != NULL; -} - -void SetCustomPrintingPageScale(double scale) { - ClearCustomPrintingPageScale(); - double* ptr = new double; - *ptr = scale; - gPrintingPageScale.Set(ptr); -} - -void ClearCustomPrintingPageScale() { - double* ptr = gPrintingPageScale.Get(); - if (ptr != NULL) { - delete ptr; - } - gPrintingPageScale.Set(NULL); -} - -} // namespace printing - |