OLD | NEW |
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 "chrome_frame/utils.h" |
| 6 |
5 #include <htiframe.h> | 7 #include <htiframe.h> |
6 #include <mshtml.h> | 8 #include <mshtml.h> |
7 #include <shlobj.h> | 9 #include <shlobj.h> |
8 #include <wininet.h> | 10 #include <wininet.h> |
9 | 11 |
10 #include <atlsecurity.h> | 12 #include <atlsecurity.h> |
11 | 13 |
12 #include "base/file_util.h" | 14 #include "base/file_util.h" |
13 #include "base/file_version_info.h" | 15 #include "base/file_version_info.h" |
14 #include "base/lazy_instance.h" | 16 #include "base/lazy_instance.h" |
15 #include "base/logging.h" | 17 #include "base/logging.h" |
16 #include "base/path_service.h" | 18 #include "base/path_service.h" |
17 #include "base/registry.h" | |
18 #include "base/scoped_bstr_win.h" | 19 #include "base/scoped_bstr_win.h" |
19 #include "base/scoped_comptr_win.h" | 20 #include "base/scoped_comptr_win.h" |
20 #include "base/scoped_variant_win.h" | 21 #include "base/scoped_variant_win.h" |
21 #include "base/string_number_conversions.h" | 22 #include "base/string_number_conversions.h" |
22 #include "base/string_tokenizer.h" | 23 #include "base/string_tokenizer.h" |
23 #include "base/string_util.h" | 24 #include "base/string_util.h" |
24 #include "base/stringprintf.h" | 25 #include "base/stringprintf.h" |
25 #include "base/thread_local.h" | 26 #include "base/thread_local.h" |
26 #include "base/utf_string_conversions.h" | 27 #include "base/utf_string_conversions.h" |
| 28 #include "base/win/registry.h" |
27 #include "chrome/common/chrome_paths_internal.h" | 29 #include "chrome/common/chrome_paths_internal.h" |
28 #include "chrome/common/url_constants.h" | 30 #include "chrome/common/url_constants.h" |
29 #include "chrome/installer/util/chrome_frame_distribution.h" | 31 #include "chrome/installer/util/chrome_frame_distribution.h" |
30 #include "chrome_frame/extra_system_apis.h" | 32 #include "chrome_frame/extra_system_apis.h" |
31 #include "chrome_frame/html_utils.h" | 33 #include "chrome_frame/html_utils.h" |
32 #include "chrome_frame/policy_settings.h" | 34 #include "chrome_frame/policy_settings.h" |
33 #include "chrome_frame/simple_resource_loader.h" | 35 #include "chrome_frame/simple_resource_loader.h" |
34 #include "chrome_frame/utils.h" | |
35 #include "googleurl/src/gurl.h" | 36 #include "googleurl/src/gurl.h" |
36 #include "googleurl/src/url_canon.h" | 37 #include "googleurl/src/url_canon.h" |
37 | |
38 #include "grit/chromium_strings.h" | 38 #include "grit/chromium_strings.h" |
39 #include "net/base/escape.h" | 39 #include "net/base/escape.h" |
40 #include "net/http/http_util.h" | 40 #include "net/http/http_util.h" |
41 | 41 |
| 42 using base::win::RegKey; |
| 43 |
42 // Note that these values are all lower case and are compared to | 44 // Note that these values are all lower case and are compared to |
43 // lower-case-transformed values. | 45 // lower-case-transformed values. |
44 const wchar_t kMetaTag[] = L"meta"; | 46 const wchar_t kMetaTag[] = L"meta"; |
45 const wchar_t kHttpEquivAttribName[] = L"http-equiv"; | 47 const wchar_t kHttpEquivAttribName[] = L"http-equiv"; |
46 const wchar_t kContentAttribName[] = L"content"; | 48 const wchar_t kContentAttribName[] = L"content"; |
47 const wchar_t kXUACompatValue[] = L"x-ua-compatible"; | 49 const wchar_t kXUACompatValue[] = L"x-ua-compatible"; |
48 const wchar_t kBodyTag[] = L"body"; | 50 const wchar_t kBodyTag[] = L"body"; |
49 const wchar_t kChromeContentPrefix[] = L"chrome="; | 51 const wchar_t kChromeContentPrefix[] = L"chrome="; |
50 const char kGCFProtocol[] = "gcf"; | 52 const char kGCFProtocol[] = "gcf"; |
51 const wchar_t kChromeProtocolPrefix[] = L"gcf:"; | 53 const wchar_t kChromeProtocolPrefix[] = L"gcf:"; |
(...skipping 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1518 void EnumerateKeyValues(HKEY parent_key, const wchar_t* sub_key_name, | 1520 void EnumerateKeyValues(HKEY parent_key, const wchar_t* sub_key_name, |
1519 std::vector<std::wstring>* values) { | 1521 std::vector<std::wstring>* values) { |
1520 DCHECK(values); | 1522 DCHECK(values); |
1521 RegistryValueIterator url_list(parent_key, sub_key_name); | 1523 RegistryValueIterator url_list(parent_key, sub_key_name); |
1522 while (url_list.Valid()) { | 1524 while (url_list.Valid()) { |
1523 values->push_back(url_list.Value()); | 1525 values->push_back(url_list.Value()); |
1524 ++url_list; | 1526 ++url_list; |
1525 } | 1527 } |
1526 } | 1528 } |
1527 | 1529 |
OLD | NEW |