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

Side by Side Diff: printing/page_overlays.cc

Issue 6257006: Move a bunch of random other files to src/ui/base... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 | « chrome/test/render_view_test.cc ('k') | printing/printed_document.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "printing/page_overlays.h" 5 #include "printing/page_overlays.h"
6 6
7 #include "app/text_elider.h"
8 #include "base/logging.h" 7 #include "base/logging.h"
9 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
10 #include "base/string_util.h" 9 #include "base/string_util.h"
11 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
12 #include "printing/printed_document.h" 11 #include "printing/printed_document.h"
13 #include "printing/printed_page.h" 12 #include "printing/printed_page.h"
14 13
15 namespace { 14 namespace {
16 15
17 // Replaces a subpart of a string by other value, and returns the position right 16 // Replaces a subpart of a string by other value, and returns the position right
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 replacement = UTF8ToWide(base::IntToString(page.page_number())); 184 replacement = UTF8ToWide(base::IntToString(page.page_number()));
186 replacement += L"/"; 185 replacement += L"/";
187 replacement += UTF8ToWide(base::IntToString(document.page_count())); 186 replacement += UTF8ToWide(base::IntToString(document.page_count()));
188 offset = ReplaceKey(&output, 187 offset = ReplaceKey(&output,
189 offset, 188 offset,
190 wcslen(kPageOnTotal), 189 wcslen(kPageOnTotal),
191 replacement); 190 replacement);
192 } else if (0 == output.compare(offset, 191 } else if (0 == output.compare(offset,
193 wcslen(kUrl), 192 wcslen(kUrl),
194 kUrl)) { 193 kUrl)) {
195 // TODO(maruel): http://b/1126373 gfx::ElideUrl(document.url(), ...) 194 // TODO(maruel): http://b/1126373 ui::ElideUrl(document.url(), ...)
196 offset = ReplaceKey(&output, 195 offset = ReplaceKey(&output,
197 offset, 196 offset,
198 wcslen(kUrl), 197 wcslen(kUrl),
199 UTF8ToWide(document.url().spec())); 198 UTF8ToWide(document.url().spec()));
200 } else { 199 } else {
201 // There is just a { in the string. 200 // There is just a { in the string.
202 ++offset; 201 ++offset;
203 } 202 }
204 } 203 }
205 return output; 204 return output;
206 } 205 }
207 206
208 } // namespace printing 207 } // namespace printing
OLDNEW
« no previous file with comments | « chrome/test/render_view_test.cc ('k') | printing/printed_document.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698