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

Unified Diff: printing/custom_scaling.cc

Issue 10387022: A better fix for scaling issue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: printing/custom_scaling.cc
===================================================================
--- printing/custom_scaling.cc (revision 135774)
+++ printing/custom_scaling.cc (working copy)
@@ -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
-

Powered by Google App Engine
This is Rietveld 408576698