diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-23 23:19:09 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-23 23:19:09 +0000 |
commit | e231975b842e70be98485ef15a26ae3c49150155 (patch) | |
tree | 3592a5dbb0c0c88182c5cf62cace2473b063d418 /printing | |
parent | 1d2ee720c0da96c8180e1be22a4a65d536e8158e (diff) | |
download | chromium_src-e231975b842e70be98485ef15a26ae3c49150155.zip chromium_src-e231975b842e70be98485ef15a26ae3c49150155.tar.gz chromium_src-e231975b842e70be98485ef15a26ae3c49150155.tar.bz2 |
Cleanup: Remove dead code - PageRange::GetTotalPages.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/8002013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102610 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing')
-rw-r--r-- | printing/page_range.cc | 9 | ||||
-rw-r--r-- | printing/page_range.h | 3 | ||||
-rw-r--r-- | printing/page_range_unittest.cc | 4 |
3 files changed, 2 insertions, 14 deletions
diff --git a/printing/page_range.cc b/printing/page_range.cc index 057ba3c..7a8cb84 100644 --- a/printing/page_range.cc +++ b/printing/page_range.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -22,11 +22,4 @@ std::vector<int> PageRange::GetPages(const PageRanges& ranges) { return std::vector<int>(pages.begin(), pages.end()); } -/* static */ -int PageRange::GetTotalPages(const PageRanges& ranges) { - // Since ranges can overlap we need to merge them before counting - std::vector<int> pages = PageRange::GetPages(ranges); - return pages.size(); -} - } // namespace printing diff --git a/printing/page_range.h b/printing/page_range.h index 1a68c22..989c33c 100644 --- a/printing/page_range.h +++ b/printing/page_range.h @@ -26,9 +26,6 @@ struct PRINTING_EXPORT PageRange { // Retrieves the sorted list of unique pages in the page ranges. static std::vector<int> GetPages(const PageRanges& ranges); - - // Gets the total number of pages. - static int GetTotalPages(const PageRanges& ranges); }; } // namespace printing diff --git a/printing/page_range_unittest.cc b/printing/page_range_unittest.cc index 2cb4f82..7b0f577 100644 --- a/printing/page_range_unittest.cc +++ b/printing/page_range_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -27,12 +27,10 @@ TEST(PageRangeTest, RangeMerge) { EXPECT_EQ(10, pages[5]); EXPECT_EQ(11, pages[6]); EXPECT_EQ(12, pages[7]); - EXPECT_EQ(8, printing::PageRange::GetTotalPages(ranges)); } TEST(PageRangeTest, Empty) { printing::PageRanges ranges; std::vector<int> pages(printing::PageRange::GetPages(ranges)); EXPECT_EQ(0U, pages.size()); - EXPECT_EQ(0, printing::PageRange::GetTotalPages(ranges)); } |