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

Side by Side Diff: net/proxy/proxy_config_service_win.cc

Issue 3836005: Move pe_image and registry from base to base/win and use the namespace. It re... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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 | « net/base/ssl_config_service_win.cc ('k') | sandbox/src/eat_resolver.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/proxy/proxy_config_service_win.h" 5 #include "net/proxy/proxy_config_service_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <winhttp.h> 8 #include <winhttp.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/registry.h"
12 #include "base/scoped_ptr.h" 11 #include "base/scoped_ptr.h"
13 #include "base/string_tokenizer.h" 12 #include "base/string_tokenizer.h"
14 #include "base/string_util.h" 13 #include "base/string_util.h"
15 #include "base/stl_util-inl.h" 14 #include "base/stl_util-inl.h"
15 #include "base/win/registry.h"
16 #include "net/base/net_errors.h" 16 #include "net/base/net_errors.h"
17 #include "net/proxy/proxy_config.h" 17 #include "net/proxy/proxy_config.h"
18 18
19 #pragma comment(lib, "winhttp.lib") 19 #pragma comment(lib, "winhttp.lib")
20 20
21 namespace net { 21 namespace net {
22 22
23 namespace { 23 namespace {
24 24
25 const int kPollIntervalSec = 10; 25 const int kPollIntervalSec = 10;
(...skipping 28 matching lines...) Expand all
54 54
55 bool CreateRegKey(HKEY rootkey, const wchar_t* subkey) { 55 bool CreateRegKey(HKEY rootkey, const wchar_t* subkey) {
56 return key_.Create(rootkey, subkey, KEY_NOTIFY); 56 return key_.Create(rootkey, subkey, KEY_NOTIFY);
57 } 57 }
58 58
59 HANDLE watch_event() const { 59 HANDLE watch_event() const {
60 return key_.watch_event(); 60 return key_.watch_event();
61 } 61 }
62 62
63 private: 63 private:
64 RegKey key_; 64 base::win::RegKey key_;
65 base::ObjectWatcher watcher_; 65 base::ObjectWatcher watcher_;
66 }; 66 };
67 67
68 ProxyConfigServiceWin::ProxyConfigServiceWin() 68 ProxyConfigServiceWin::ProxyConfigServiceWin()
69 : PollingProxyConfigService( 69 : PollingProxyConfigService(
70 base::TimeDelta::FromSeconds(kPollIntervalSec), 70 base::TimeDelta::FromSeconds(kPollIntervalSec),
71 &ProxyConfigServiceWin::GetCurrentProxyConfig) { 71 &ProxyConfigServiceWin::GetCurrentProxyConfig) {
72 } 72 }
73 73
74 ProxyConfigServiceWin::~ProxyConfigServiceWin() { 74 ProxyConfigServiceWin::~ProxyConfigServiceWin() {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 while (proxy_server_bypass_list.GetNext()) { 175 while (proxy_server_bypass_list.GetNext()) {
176 std::string bypass_url_domain = proxy_server_bypass_list.token(); 176 std::string bypass_url_domain = proxy_server_bypass_list.token();
177 config->proxy_rules().bypass_rules.AddRuleFromString(bypass_url_domain); 177 config->proxy_rules().bypass_rules.AddRuleFromString(bypass_url_domain);
178 } 178 }
179 } 179 }
180 if (ie_config.lpszAutoConfigUrl) 180 if (ie_config.lpszAutoConfigUrl)
181 config->set_pac_url(GURL(ie_config.lpszAutoConfigUrl)); 181 config->set_pac_url(GURL(ie_config.lpszAutoConfigUrl));
182 } 182 }
183 183
184 } // namespace net 184 } // namespace net
OLDNEW
« no previous file with comments | « net/base/ssl_config_service_win.cc ('k') | sandbox/src/eat_resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698