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

Unified Diff: chrome/browser/printing/page_range.cc

Issue 149212: Move printing related stuff to the root printing project from the browser pro... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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: chrome/browser/printing/page_range.cc
===================================================================
--- chrome/browser/printing/page_range.cc (revision 20026)
+++ chrome/browser/printing/page_range.cc (working copy)
@@ -1,31 +0,0 @@
-// Copyright (c) 2006-2008 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 "chrome/browser/printing/page_range.h"
-
-#include "base/stl_util-inl.h"
-
-namespace printing {
-
-/* static */
-std::vector<int> PageRange::GetPages(const PageRanges& ranges) {
- std::set<int> pages;
- for (unsigned i = 0; i < ranges.size(); ++i) {
- const PageRange& range = ranges[i];
- // Ranges are inclusive.
- for (int i = range.from; i <= range.to; ++i) {
- pages.insert(i);
- }
- }
- return SetToVector(pages);
-}
-
-/* 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

Powered by Google App Engine
This is Rietveld 408576698