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

Side by Side Diff: chrome_frame/utils.cc

Issue 8921006: Standardize StringToInt{,64} interface. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix call syntax of StringToInt() in Chrome OS code. Created 9 years 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 | « chrome_frame/test/test_server.cc ('k') | net/base/net_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) 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 "chrome_frame/utils.h" 5 #include "chrome_frame/utils.h"
6 6
7 #include <atlsafe.h> 7 #include <atlsafe.h>
8 #include <atlsecurity.h> 8 #include <atlsecurity.h>
9 #include <htiframe.h> 9 #include <htiframe.h>
10 #include <mshtml.h> 10 #include <mshtml.h>
11 #include <shlobj.h> 11 #include <shlobj.h>
12 12
13 #include "base/file_util.h" 13 #include "base/file_util.h"
14 #include "base/file_version_info.h" 14 #include "base/file_version_info.h"
15 #include "base/lazy_instance.h" 15 #include "base/lazy_instance.h"
16 #include "base/logging.h" 16 #include "base/logging.h"
17 #include "base/path_service.h" 17 #include "base/path_service.h"
18 #include "base/string_number_conversions.h" 18 #include "base/string_number_conversions.h"
19 #include "base/string_piece.h"
19 #include "base/string_tokenizer.h" 20 #include "base/string_tokenizer.h"
20 #include "base/string_util.h" 21 #include "base/string_util.h"
21 #include "base/stringprintf.h" 22 #include "base/stringprintf.h"
22 #include "base/threading/thread_local.h" 23 #include "base/threading/thread_local.h"
23 #include "base/utf_string_conversions.h" 24 #include "base/utf_string_conversions.h"
24 #include "base/win/registry.h" 25 #include "base/win/registry.h"
25 #include "base/win/scoped_bstr.h" 26 #include "base/win/scoped_bstr.h"
26 #include "base/win/scoped_comptr.h" 27 #include "base/win/scoped_comptr.h"
27 #include "base/win/scoped_variant.h" 28 #include "base/win/scoped_variant.h"
28 #include "chrome/common/automation_messages.h" 29 #include "chrome/common/automation_messages.h"
(...skipping 1518 matching lines...) Expand 10 before | Expand all | Expand 10 after
1547 return std::numeric_limits<int>::max(); 1548 return std::numeric_limits<int>::max();
1548 } 1549 }
1549 1550
1550 if (filter_length < 3 || 1551 if (filter_length < 3 ||
1551 !LowerCaseEqualsASCII(filter_begin, filter_begin + 2, "ie") || 1552 !LowerCaseEqualsASCII(filter_begin, filter_begin + 2, "ie") ||
1552 !isdigit(*(filter_begin + 2))) { // ensure no leading +/- 1553 !isdigit(*(filter_begin + 2))) { // ensure no leading +/-
1553 continue; 1554 continue;
1554 } 1555 }
1555 1556
1556 int header_ie_version = 0; 1557 int header_ie_version = 0;
1557 if (!base::StringToInt(filter_begin + 2, filter_end, &header_ie_version) || 1558 if (!base::StringToInt(base::StringPiece(filter_begin + 2,
1559 filter_end),
1560 &header_ie_version) ||
1558 header_ie_version == 0) { // ensure it's not a sequence of 0's 1561 header_ie_version == 0) { // ensure it's not a sequence of 0's
1559 continue; 1562 continue;
1560 } 1563 }
1561 1564
1562 // The first valid directive we find wins, whether it matches or not 1565 // The first valid directive we find wins, whether it matches or not
1563 return header_ie_version; 1566 return header_ie_version;
1564 } 1567 }
1565 return -1; 1568 return -1;
1566 } 1569 }
1567 1570
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
1634 ret = InternetSetOption(NULL, connection_options[option_index], 1637 ret = InternetSetOption(NULL, connection_options[option_index],
1635 &connections, connection_value_size); 1638 &connections, connection_value_size);
1636 if (!ret) { 1639 if (!ret) {
1637 return false; 1640 return false;
1638 } 1641 }
1639 } 1642 }
1640 wininet_connection_count_updated = true; 1643 wininet_connection_count_updated = true;
1641 return true; 1644 return true;
1642 } 1645 }
1643 1646
OLDNEW
« no previous file with comments | « chrome_frame/test/test_server.cc ('k') | net/base/net_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698