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

Unified Diff: chrome/browser/chromeos/proxy_config_service.h

Issue 3047052: chromeos: 1st draft of ProxyConfigService for chromeos... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/proxy_config_service_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/proxy_config_service.h
===================================================================
--- chrome/browser/chromeos/proxy_config_service.h (revision 0)
+++ chrome/browser/chromeos/proxy_config_service.h (revision 0)
@@ -0,0 +1,42 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_PROXY_CONFIG_SERVICE_H_
+#define CHROME_BROWSER_CHROMEOS_PROXY_CONFIG_SERVICE_H_
+#pragma once
+
+#include "chrome/browser/chromeos/proxy_config_service_impl.h"
+
+namespace chromeos {
+
+// Wrapper class for the RefCountedThreadSafe chromeos::ProxyConfigServiceImpl
+// that forwards net::ProxyConfigService interface to the actual implementation,
+// instantiated in
+// chrome/browser/net/chrome_url_request_context.cc::CreateProxyConfigService.
+class ProxyConfigService : public net::ProxyConfigService {
+ public:
+ explicit ProxyConfigService(const scoped_refptr<ProxyConfigServiceImpl>& impl)
+ : impl_(impl) {}
+ virtual ~ProxyConfigService() {}
+
+ // ProxyConfigService methods. Called from IO thread.
+ virtual void AddObserver(Observer* observer) {
+ impl_->AddObserver(observer);
+ }
+ virtual void RemoveObserver(Observer* observer) {
+ impl_->RemoveObserver(observer);
+ }
+ virtual bool GetLatestProxyConfig(net::ProxyConfig* config) {
+ return impl_->IOGetProxyConfig(config);
+ }
+
+ private:
+ scoped_refptr<ProxyConfigServiceImpl> impl_;
+
+ DISALLOW_COPY_AND_ASSIGN(ProxyConfigService);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_PROXY_CONFIG_SERVICE_H_
Property changes on: chrome\browser\chromeos\proxy_config_service.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « no previous file | chrome/browser/chromeos/proxy_config_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698