summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-31 04:41:11 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-31 04:41:11 +0000
commit462875e53236ba3f52ce26c356c3d7033fd477b1 (patch)
tree6169979e1fb30e9ea08e1230ed9f67bd2868486f
parent9f6251c2208cc1c9b0bce05f97807e240edd5a95 (diff)
downloadchromium_src-462875e53236ba3f52ce26c356c3d7033fd477b1.zip
chromium_src-462875e53236ba3f52ce26c356c3d7033fd477b1.tar.gz
chromium_src-462875e53236ba3f52ce26c356c3d7033fd477b1.tar.bz2
Fix NULL scoped_refptr in PrintSystemTaskProxy tests.
BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/9264063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119849 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/printing/print_system_task_proxy.cc3
-rw-r--r--chrome/browser/printing/print_system_task_proxy.h4
-rw-r--r--chrome/browser/printing/print_system_task_proxy_unittest.cc8
3 files changed, 7 insertions, 8 deletions
diff --git a/chrome/browser/printing/print_system_task_proxy.cc b/chrome/browser/printing/print_system_task_proxy.cc
index 9d758fa..99baaf8 100644
--- a/chrome/browser/printing/print_system_task_proxy.cc
+++ b/chrome/browser/printing/print_system_task_proxy.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// 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.
@@ -397,6 +397,7 @@ void PrintSystemTaskProxy::SetupPrinterList(ListValue* printers) {
}
#if defined(USE_CUPS)
+// static
bool PrintSystemTaskProxy::GetPrinterCapabilitiesCUPS(
const printing::PrinterCapsAndDefaults& printer_info,
const std::string& printer_name,
diff --git a/chrome/browser/printing/print_system_task_proxy.h b/chrome/browser/printing/print_system_task_proxy.h
index 8d9c5767..7da1881 100644
--- a/chrome/browser/printing/print_system_task_proxy.h
+++ b/chrome/browser/printing/print_system_task_proxy.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// 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.
@@ -70,7 +70,7 @@ class PrintSystemTaskProxy
#endif
#if defined(USE_CUPS)
- bool GetPrinterCapabilitiesCUPS(
+ static bool GetPrinterCapabilitiesCUPS(
const printing::PrinterCapsAndDefaults& printer_info,
const std::string& printer_name,
bool* set_color_as_default,
diff --git a/chrome/browser/printing/print_system_task_proxy_unittest.cc b/chrome/browser/printing/print_system_task_proxy_unittest.cc
index 761a9ef..9876583 100644
--- a/chrome/browser/printing/print_system_task_proxy_unittest.cc
+++ b/chrome/browser/printing/print_system_task_proxy_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// 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.
@@ -250,8 +250,7 @@ TEST(PrintSystemTaskProxyTest, DetectDuplexModeCUPS) {
int printer_color_space_for_black = printing::UNKNOWN_COLOR_MODEL;
int default_duplex_setting_value = printing::UNKNOWN_DUPLEX_MODE;
- scoped_refptr<PrintSystemTaskProxy> test_proxy;
- bool res = test_proxy->GetPrinterCapabilitiesCUPS(
+ bool res = PrintSystemTaskProxy::GetPrinterCapabilitiesCUPS(
printer_info,
"InvalidPrinter",
&set_color_as_default,
@@ -278,8 +277,7 @@ TEST(PrintSystemTaskProxyTest, DetectNoDuplexModeCUPS) {
int printer_color_space_for_black = printing::UNKNOWN_COLOR_MODEL;
int default_duplex_setting_value = printing::UNKNOWN_DUPLEX_MODE;
- scoped_refptr<PrintSystemTaskProxy> test_proxy;
- bool res = test_proxy->GetPrinterCapabilitiesCUPS(
+ bool res = PrintSystemTaskProxy::GetPrinterCapabilitiesCUPS(
printer_info,
"InvalidPrinter",
&set_color_as_default,