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

Side by Side Diff: printing/print_settings_initializer.cc

Issue 18919005: Migrate from googleurl/ includes to url/ ones in the remaining top-level directories. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make googleurl a temp include rule - to prevent others including it again Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « printing/backend/print_backend_cups.cc ('k') | remoting/client/plugin/chromoting_instance.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 #include "printing/print_settings_initializer.h" 5 #include "printing/print_settings_initializer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 10
11 #include "base/i18n/time_formatting.h" 11 #include "base/i18n/time_formatting.h"
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "googleurl/src/gurl.h"
17 #include "printing/print_job_constants.h" 16 #include "printing/print_job_constants.h"
18 #include "printing/print_settings.h" 17 #include "printing/print_settings.h"
19 #include "printing/units.h" 18 #include "printing/units.h"
20 #include "ui/base/text/text_elider.h" 19 #include "ui/base/text/text_elider.h"
20 #include "url/gurl.h"
21 21
22 using base::DictionaryValue; 22 using base::DictionaryValue;
23 23
24 namespace printing { 24 namespace printing {
25 25
26 void PrintSettingsInitializer::InitHeaderFooterStrings( 26 void PrintSettingsInitializer::InitHeaderFooterStrings(
27 const DictionaryValue& job_settings, 27 const DictionaryValue& job_settings,
28 PrintSettings* print_settings) { 28 PrintSettings* print_settings) {
29 if (!job_settings.GetBoolean(kSettingHeaderFooterEnabled, 29 if (!job_settings.GetBoolean(kSettingHeaderFooterEnabled,
30 &print_settings->display_header_footer)) { 30 &print_settings->display_header_footer)) {
31 NOTREACHED(); 31 NOTREACHED();
32 } 32 }
33 if (!print_settings->display_header_footer) 33 if (!print_settings->display_header_footer)
34 return; 34 return;
35 35
36 string16 date = base::TimeFormatShortDateNumeric(base::Time::Now()); 36 string16 date = base::TimeFormatShortDateNumeric(base::Time::Now());
37 string16 title; 37 string16 title;
38 string16 url; 38 string16 url;
39 if (!job_settings.GetString(kSettingHeaderFooterTitle, &title) || 39 if (!job_settings.GetString(kSettingHeaderFooterTitle, &title) ||
40 !job_settings.GetString(kSettingHeaderFooterURL, &url)) { 40 !job_settings.GetString(kSettingHeaderFooterURL, &url)) {
41 NOTREACHED(); 41 NOTREACHED();
42 } 42 }
43 43
44 print_settings->date = date; 44 print_settings->date = date;
45 print_settings->title = title; 45 print_settings->title = title;
46 print_settings->url = ui::ElideUrl(GURL(url), gfx::Font(), 0, std::string()); 46 print_settings->url = ui::ElideUrl(GURL(url), gfx::Font(), 0, std::string());
47 } 47 }
48 48
49 } // namespace printing 49 } // namespace printing
OLDNEW
« no previous file with comments | « printing/backend/print_backend_cups.cc ('k') | remoting/client/plugin/chromoting_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698