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

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

Issue 1158923005: Use the exact-width integer types defined in <stdint.h> rather than (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweak comments. Exclude mime_sniffer*. Rebase. 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
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 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 kFormatUrlOmitHTTP | kFormatUrlOmitTrailingSlashOnBareHostname; 580 kFormatUrlOmitHTTP | kFormatUrlOmitTrailingSlashOnBareHostname;
581 581
582 base::string16 IDNToUnicode(const std::string& host, 582 base::string16 IDNToUnicode(const std::string& host,
583 const std::string& languages) { 583 const std::string& languages) {
584 return IDNToUnicodeWithAdjustments(host, languages, NULL); 584 return IDNToUnicodeWithAdjustments(host, languages, NULL);
585 } 585 }
586 586
587 std::string GetDirectoryListingEntry(const base::string16& name, 587 std::string GetDirectoryListingEntry(const base::string16& name,
588 const std::string& raw_bytes, 588 const std::string& raw_bytes,
589 bool is_dir, 589 bool is_dir,
590 int64 size, 590 int64_t size,
591 Time modified) { 591 Time modified) {
592 std::string result; 592 std::string result;
593 result.append("<script>addRow("); 593 result.append("<script>addRow(");
594 base::EscapeJSONString(name, true, &result); 594 base::EscapeJSONString(name, true, &result);
595 result.append(","); 595 result.append(",");
596 if (raw_bytes.empty()) { 596 if (raw_bytes.empty()) {
597 base::EscapeJSONString(EscapePath(base::UTF16ToUTF8(name)), true, &result); 597 base::EscapeJSONString(EscapePath(base::UTF16ToUTF8(name)), true, &result);
598 } else { 598 } else {
599 base::EscapeJSONString(EscapePath(raw_bytes), true, &result); 599 base::EscapeJSONString(EscapePath(raw_bytes), true, &result);
600 } 600 }
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 if (offset_for_adjustment) 823 if (offset_for_adjustment)
824 offsets.push_back(*offset_for_adjustment); 824 offsets.push_back(*offset_for_adjustment);
825 base::string16 result = FormatUrlWithOffsets(url, languages, format_types, 825 base::string16 result = FormatUrlWithOffsets(url, languages, format_types,
826 unescape_rules, new_parsed, prefix_end, &offsets); 826 unescape_rules, new_parsed, prefix_end, &offsets);
827 if (offset_for_adjustment) 827 if (offset_for_adjustment)
828 *offset_for_adjustment = offsets[0]; 828 *offset_for_adjustment = offsets[0];
829 return result; 829 return result;
830 } 830 }
831 831
832 } // namespace net 832 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698