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
3 // found in the LICENSE file.
5 #include "printing/page_range.h"
14 std::vector<int> PageRange::GetPages(const PageRanges& ranges) {
15 // TODO(vitalybuka): crbug.com/95548 Remove this method as part fix.
17 for (const PageRange& range : ranges) {
18 // Ranges are inclusive.
19 for (int i = range.from; i <= range.to; ++i) {
20 static constexpr size_t kMaxNumberOfPages = 100000;
22 if (pages.size() >= kMaxNumberOfPages)
23 return std::vector<int>(pages.begin(), pages.end());
26 return std::vector<int>(pages.begin(), pages.end());
29 } // namespace printing