OLD | NEW |
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 "chrome/browser/ui/webui/chromeos/proxy_settings_ui.h" | 5 #include "chrome/browser/ui/webui/chromeos/proxy_settings_ui.h" |
6 | 6 |
7 #include "base/memory/ref_counted_memory.h" | 7 #include "base/memory/ref_counted_memory.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 namespace { | 29 namespace { |
30 | 30 |
31 class ProxySettingsHTMLSource : public ChromeURLDataManager::DataSource { | 31 class ProxySettingsHTMLSource : public ChromeURLDataManager::DataSource { |
32 public: | 32 public: |
33 explicit ProxySettingsHTMLSource(DictionaryValue* localized_strings); | 33 explicit ProxySettingsHTMLSource(DictionaryValue* localized_strings); |
34 | 34 |
35 // Called when the network layer has requested a resource underneath | 35 // Called when the network layer has requested a resource underneath |
36 // the path we registered. | 36 // the path we registered. |
37 virtual void StartDataRequest(const std::string& path, | 37 virtual void StartDataRequest(const std::string& path, |
38 bool is_incognito, | 38 bool is_incognito, |
39 int request_id); | 39 int request_id) OVERRIDE; |
40 virtual std::string GetMimeType(const std::string&) const { | 40 virtual std::string GetMimeType(const std::string&) const OVERRIDE { |
41 return "text/html"; | 41 return "text/html"; |
42 } | 42 } |
43 | 43 |
| 44 protected: |
| 45 virtual ~ProxySettingsHTMLSource() {} |
| 46 |
44 private: | 47 private: |
45 scoped_ptr<DictionaryValue> localized_strings_; | 48 scoped_ptr<DictionaryValue> localized_strings_; |
46 | 49 |
47 DISALLOW_COPY_AND_ASSIGN(ProxySettingsHTMLSource); | 50 DISALLOW_COPY_AND_ASSIGN(ProxySettingsHTMLSource); |
48 }; | 51 }; |
49 | 52 |
50 ProxySettingsHTMLSource::ProxySettingsHTMLSource( | 53 ProxySettingsHTMLSource::ProxySettingsHTMLSource( |
51 DictionaryValue* localized_strings) | 54 DictionaryValue* localized_strings) |
52 : DataSource(chrome::kChromeUIProxySettingsHost, MessageLoop::current()), | 55 : DataSource(chrome::kChromeUIProxySettingsHost, MessageLoop::current()), |
53 localized_strings_(localized_strings) { | 56 localized_strings_(localized_strings) { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 core_handler_->InitializePage(); | 107 core_handler_->InitializePage(); |
105 proxy_handler_->InitializePage(); | 108 proxy_handler_->InitializePage(); |
106 Profile* profile = Profile::FromWebUI(web_ui()); | 109 Profile* profile = Profile::FromWebUI(web_ui()); |
107 PrefProxyConfigTracker* proxy_tracker = profile->GetProxyConfigTracker(); | 110 PrefProxyConfigTracker* proxy_tracker = profile->GetProxyConfigTracker(); |
108 proxy_tracker->UIMakeActiveNetworkCurrent(); | 111 proxy_tracker->UIMakeActiveNetworkCurrent(); |
109 std::string network_name; | 112 std::string network_name; |
110 proxy_tracker->UIGetCurrentNetworkName(&network_name); | 113 proxy_tracker->UIGetCurrentNetworkName(&network_name); |
111 } | 114 } |
112 | 115 |
113 } // namespace chromeos | 116 } // namespace chromeos |
OLD | NEW |