| 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 <memory> |
| 8 |
| 7 #include "base/macros.h" | 9 #include "base/macros.h" |
| 8 #include "base/memory/ref_counted_memory.h" | 10 #include "base/memory/ref_counted_memory.h" |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "base/values.h" | 11 #include "base/values.h" |
| 11 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
| 12 #include "chrome/browser/chromeos/system/input_device_settings.h" | 13 #include "chrome/browser/chromeos/system/input_device_settings.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 14 #include "chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler
.h" | 15 #include "chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler
.h" |
| 15 #include "chrome/browser/ui/webui/options/chromeos/proxy_handler.h" | 16 #include "chrome/browser/ui/webui/options/chromeos/proxy_handler.h" |
| 16 #include "chrome/common/chrome_constants.h" | 17 #include "chrome/common/chrome_constants.h" |
| 17 #include "chrome/common/url_constants.h" | 18 #include "chrome/common/url_constants.h" |
| 18 #include "chromeos/chromeos_constants.h" | 19 #include "chromeos/chromeos_constants.h" |
| 19 #include "content/public/browser/url_data_source.h" | 20 #include "content/public/browser/url_data_source.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 43 const content::URLDataSource::GotDataCallback& callback) override; | 44 const content::URLDataSource::GotDataCallback& callback) override; |
| 44 std::string GetMimeType(const std::string&) const override { | 45 std::string GetMimeType(const std::string&) const override { |
| 45 return "text/html"; | 46 return "text/html"; |
| 46 } | 47 } |
| 47 bool ShouldAddContentSecurityPolicy() const override { return false; } | 48 bool ShouldAddContentSecurityPolicy() const override { return false; } |
| 48 | 49 |
| 49 protected: | 50 protected: |
| 50 ~ProxySettingsHTMLSource() override {} | 51 ~ProxySettingsHTMLSource() override {} |
| 51 | 52 |
| 52 private: | 53 private: |
| 53 scoped_ptr<base::DictionaryValue> localized_strings_; | 54 std::unique_ptr<base::DictionaryValue> localized_strings_; |
| 54 | 55 |
| 55 DISALLOW_COPY_AND_ASSIGN(ProxySettingsHTMLSource); | 56 DISALLOW_COPY_AND_ASSIGN(ProxySettingsHTMLSource); |
| 56 }; | 57 }; |
| 57 | 58 |
| 58 ProxySettingsHTMLSource::ProxySettingsHTMLSource( | 59 ProxySettingsHTMLSource::ProxySettingsHTMLSource( |
| 59 base::DictionaryValue* localized_strings) | 60 base::DictionaryValue* localized_strings) |
| 60 : localized_strings_(localized_strings) { | 61 : localized_strings_(localized_strings) { |
| 61 } | 62 } |
| 62 | 63 |
| 63 std::string ProxySettingsHTMLSource::GetSource() const { | 64 std::string ProxySettingsHTMLSource::GetSource() const { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 if (!initialized_handlers_) { | 126 if (!initialized_handlers_) { |
| 126 core_handler_->InitializeHandler(); | 127 core_handler_->InitializeHandler(); |
| 127 proxy_handler_->InitializeHandler(); | 128 proxy_handler_->InitializeHandler(); |
| 128 initialized_handlers_ = true; | 129 initialized_handlers_ = true; |
| 129 } | 130 } |
| 130 core_handler_->InitializePage(); | 131 core_handler_->InitializePage(); |
| 131 proxy_handler_->InitializePage(); | 132 proxy_handler_->InitializePage(); |
| 132 } | 133 } |
| 133 | 134 |
| 134 } // namespace chromeos | 135 } // namespace chromeos |
| OLD | NEW |