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

Side by Side Diff: chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc

Issue 10196004: Changed ChromeURLDataManager to a ProfileKeyedService and made a Factory for it. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Made ChromeURLDataManager's destructor virtual Created 8 years, 8 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
OLDNEW
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 core_handler_->set_handlers_host(this); 80 core_handler_->set_handlers_host(this);
81 core_handler_->GetLocalizedValues(localized_strings); 81 core_handler_->GetLocalizedValues(localized_strings);
82 web_ui->AddMessageHandler(core_handler_); 82 web_ui->AddMessageHandler(core_handler_);
83 83
84 proxy_handler_->GetLocalizedValues(localized_strings); 84 proxy_handler_->GetLocalizedValues(localized_strings);
85 web_ui->AddMessageHandler(proxy_handler_); 85 web_ui->AddMessageHandler(proxy_handler_);
86 86
87 ProxySettingsHTMLSource* source = 87 ProxySettingsHTMLSource* source =
88 new ProxySettingsHTMLSource(localized_strings); 88 new ProxySettingsHTMLSource(localized_strings);
89 Profile* profile = Profile::FromWebUI(web_ui); 89 Profile* profile = Profile::FromWebUI(web_ui);
90 profile->GetChromeURLDataManager()->AddDataSource(source); 90 ChromeURLDataManager::AddDataSource(profile, source);
91 } 91 }
92 92
93 ProxySettingsUI::~ProxySettingsUI() { 93 ProxySettingsUI::~ProxySettingsUI() {
94 // Uninitialize all registered handlers. The base class owns them and it will 94 // Uninitialize all registered handlers. The base class owns them and it will
95 // eventually delete them. 95 // eventually delete them.
96 core_handler_->Uninitialize(); 96 core_handler_->Uninitialize();
97 proxy_handler_->Uninitialize(); 97 proxy_handler_->Uninitialize();
98 } 98 }
99 99
100 void ProxySettingsUI::InitializeHandlers() { 100 void ProxySettingsUI::InitializeHandlers() {
101 core_handler_->InitializeHandler(); 101 core_handler_->InitializeHandler();
102 proxy_handler_->InitializeHandler(); 102 proxy_handler_->InitializeHandler();
103 core_handler_->InitializePage(); 103 core_handler_->InitializePage();
104 proxy_handler_->InitializePage(); 104 proxy_handler_->InitializePage();
105 Profile* profile = Profile::FromWebUI(web_ui()); 105 Profile* profile = Profile::FromWebUI(web_ui());
106 PrefProxyConfigTracker* proxy_tracker = profile->GetProxyConfigTracker(); 106 PrefProxyConfigTracker* proxy_tracker = profile->GetProxyConfigTracker();
107 proxy_tracker->UIMakeActiveNetworkCurrent(); 107 proxy_tracker->UIMakeActiveNetworkCurrent();
108 std::string network_name; 108 std::string network_name;
109 proxy_tracker->UIGetCurrentNetworkName(&network_name); 109 proxy_tracker->UIGetCurrentNetworkName(&network_name);
110 } 110 }
111 111
112 } // namespace chromeos 112 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc ('k') | chrome/browser/ui/webui/chromeos/register_page_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698