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

Side by Side Diff: printing/page_range.h

Issue 8002013: Cleanup: Remove dead code - PageRange::GetTotalPages. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | printing/page_range.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef PRINTING_PAGE_RANGE_H_ 5 #ifndef PRINTING_PAGE_RANGE_H_
6 #define PRINTING_PAGE_RANGE_H_ 6 #define PRINTING_PAGE_RANGE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "printing_export.h" 10 #include "printing_export.h"
11 11
12 namespace printing { 12 namespace printing {
13 13
14 struct PageRange; 14 struct PageRange;
15 15
16 typedef std::vector<PageRange> PageRanges; 16 typedef std::vector<PageRange> PageRanges;
17 17
18 // Print range is inclusive. To select one page, set from == to. 18 // Print range is inclusive. To select one page, set from == to.
19 struct PRINTING_EXPORT PageRange { 19 struct PRINTING_EXPORT PageRange {
20 int from; 20 int from;
21 int to; 21 int to;
22 22
23 bool operator==(const PageRange& rhs) const { 23 bool operator==(const PageRange& rhs) const {
24 return from == rhs.from && to == rhs.to; 24 return from == rhs.from && to == rhs.to;
25 } 25 }
26 26
27 // Retrieves the sorted list of unique pages in the page ranges. 27 // Retrieves the sorted list of unique pages in the page ranges.
28 static std::vector<int> GetPages(const PageRanges& ranges); 28 static std::vector<int> GetPages(const PageRanges& ranges);
29
30 // Gets the total number of pages.
31 static int GetTotalPages(const PageRanges& ranges);
32 }; 29 };
33 30
34 } // namespace printing 31 } // namespace printing
35 32
36 #endif // PRINTING_PAGE_RANGE_H_ 33 #endif // PRINTING_PAGE_RANGE_H_
OLDNEW
« no previous file with comments | « no previous file | printing/page_range.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698