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

Side by Side Diff: chrome/browser/ui/webui/options/options_ui.cc

Issue 7064052: Revert 88142 to fix sync_integration_tests offline. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/options/options_ui.h" 5 #include "chrome/browser/ui/webui/options/options_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 ThemeSource* theme = new ThemeSource(contents->profile()); 275 ThemeSource* theme = new ThemeSource(contents->profile());
276 contents->profile()->GetChromeURLDataManager()->AddDataSource(theme); 276 contents->profile()->GetChromeURLDataManager()->AddDataSource(theme);
277 277
278 #if defined(OS_CHROMEOS) 278 #if defined(OS_CHROMEOS)
279 // Set up the chrome://userimage/ source. 279 // Set up the chrome://userimage/ source.
280 chromeos::UserImageSource* user_image_source = 280 chromeos::UserImageSource* user_image_source =
281 new chromeos::UserImageSource(); 281 new chromeos::UserImageSource();
282 contents->profile()->GetChromeURLDataManager()->AddDataSource( 282 contents->profile()->GetChromeURLDataManager()->AddDataSource(
283 user_image_source); 283 user_image_source);
284 #endif 284 #endif
285
286 // Initialize the chrome://about/ source in case the user clicks the credits
287 // link.
288 InitializeAboutDataSource(contents->profile());
285 } 289 }
286 290
287 OptionsUI::~OptionsUI() { 291 OptionsUI::~OptionsUI() {
288 // Uninitialize all registered handlers. The base class owns them and it will 292 // Uninitialize all registered handlers. The base class owns them and it will
289 // eventually delete them. Skip over the generic handler. 293 // eventually delete them. Skip over the generic handler.
290 for (std::vector<WebUIMessageHandler*>::iterator iter = handlers_.begin() + 1; 294 for (std::vector<WebUIMessageHandler*>::iterator iter = handlers_.begin() + 1;
291 iter != handlers_.end(); 295 iter != handlers_.end();
292 ++iter) { 296 ++iter) {
293 static_cast<OptionsPageUIHandler*>(*iter)->Uninitialize(); 297 static_cast<OptionsPageUIHandler*>(*iter)->Uninitialize();
294 } 298 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 OptionsPageUIHandler* handler_raw) { 353 OptionsPageUIHandler* handler_raw) {
350 scoped_ptr<OptionsPageUIHandler> handler(handler_raw); 354 scoped_ptr<OptionsPageUIHandler> handler(handler_raw);
351 DCHECK(handler.get()); 355 DCHECK(handler.get());
352 // Add only if handler's service is enabled. 356 // Add only if handler's service is enabled.
353 if (handler->IsEnabled()) { 357 if (handler->IsEnabled()) {
354 handler->GetLocalizedValues(localized_strings); 358 handler->GetLocalizedValues(localized_strings);
355 // Add handler to the list and also pass the ownership. 359 // Add handler to the list and also pass the ownership.
356 AddMessageHandler(handler.release()->Attach(this)); 360 AddMessageHandler(handler.release()->Attach(this));
357 } 361 }
358 } 362 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/about_page_handler.cc ('k') | chrome/browser/ui/webui/web_ui_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698