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

Side by Side Diff: net/base/net_util_icu.cc

Issue 1200053004: Move more string_util functions to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « net/base/net_util.cc ('k') | net/cookies/cookie_util.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/base/net_util.h" 5 #include "net/base/net_util.h"
6 6
7 #include <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/i18n/time_formatting.h" 10 #include "base/i18n/time_formatting.h"
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 } 603 }
604 if (is_dir) { 604 if (is_dir) {
605 result.append(",1,"); 605 result.append(",1,");
606 } else { 606 } else {
607 result.append(",0,"); 607 result.append(",0,");
608 } 608 }
609 609
610 // Negative size means unknown or not applicable (e.g. directory). 610 // Negative size means unknown or not applicable (e.g. directory).
611 base::string16 size_string; 611 base::string16 size_string;
612 if (size >= 0) 612 if (size >= 0)
613 size_string = FormatBytesUnlocalized(size); 613 size_string = base::FormatBytesUnlocalized(size);
614 base::EscapeJSONString(size_string, true, &result); 614 base::EscapeJSONString(size_string, true, &result);
615 615
616 result.append(","); 616 result.append(",");
617 617
618 base::string16 modified_str; 618 base::string16 modified_str;
619 // |modified| can be NULL in FTP listings. 619 // |modified| can be NULL in FTP listings.
620 if (!modified.is_null()) { 620 if (!modified.is_null()) {
621 modified_str = base::TimeFormatShortDateAndTime(modified); 621 modified_str = base::TimeFormatShortDateAndTime(modified);
622 } 622 }
623 base::EscapeJSONString(modified_str, true, &result); 623 base::EscapeJSONString(modified_str, true, &result);
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 if (offset_for_adjustment) 828 if (offset_for_adjustment)
829 offsets.push_back(*offset_for_adjustment); 829 offsets.push_back(*offset_for_adjustment);
830 base::string16 result = FormatUrlWithOffsets(url, languages, format_types, 830 base::string16 result = FormatUrlWithOffsets(url, languages, format_types,
831 unescape_rules, new_parsed, prefix_end, &offsets); 831 unescape_rules, new_parsed, prefix_end, &offsets);
832 if (offset_for_adjustment) 832 if (offset_for_adjustment)
833 *offset_for_adjustment = offsets[0]; 833 *offset_for_adjustment = offsets[0];
834 return result; 834 return result;
835 } 835 }
836 836
837 } // namespace net 837 } // namespace net
OLDNEW
« no previous file with comments | « net/base/net_util.cc ('k') | net/cookies/cookie_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698