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

Side by Side Diff: chrome/browser/ui/webui/about_ui.cc

Issue 21030009: Make element removal methods in DictionaryValue and ListValue take scoped_ptr's as outparams. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 7 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 unified diff | Download patch | Annotate | Revision Log
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/about_ui.h" 5 #include "chrome/browser/ui/webui/about_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 // Get about_stats.html/js from resource bundle. 848 // Get about_stats.html/js from resource bundle.
849 data = ResourceBundle::GetSharedInstance().GetRawDataResource( 849 data = ResourceBundle::GetSharedInstance().GetRawDataResource(
850 (query == kStatsJsPath ? 850 (query == kStatsJsPath ?
851 IDR_ABOUT_STATS_JS : IDR_ABOUT_STATS_HTML)).as_string(); 851 IDR_ABOUT_STATS_JS : IDR_ABOUT_STATS_HTML)).as_string();
852 852
853 if (query != kStatsJsPath) { 853 if (query != kStatsJsPath) {
854 // Clear the timer list since we stored the data in the timers list 854 // Clear the timer list since we stored the data in the timers list
855 // as well. 855 // as well.
856 for (int index = static_cast<int>(timers->GetSize())-1; index >= 0; 856 for (int index = static_cast<int>(timers->GetSize())-1; index >= 0;
857 index--) { 857 index--) {
858 Value* value; 858 scoped_ptr<Value> value;
859 timers->Remove(index, &value); 859 timers->Remove(index, &value);
860 // We don't care about the value pointer; it's still tracked 860 // We don't care about the value pointer; it's still tracked
861 // on the counters list. 861 // on the counters list.
862 ignore_result(value.release());
862 } 863 }
863 } 864 }
864 } 865 }
865 866
866 return data; 867 return data;
867 } 868 }
868 869
869 #if defined(OS_LINUX) || defined(OS_OPENBSD) 870 #if defined(OS_LINUX) || defined(OS_OPENBSD)
870 std::string AboutLinuxProxyConfig() { 871 std::string AboutLinuxProxyConfig() {
871 std::string data; 872 std::string data;
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
1191 Profile* profile = Profile::FromWebUI(web_ui); 1192 Profile* profile = Profile::FromWebUI(web_ui);
1192 1193
1193 #if defined(ENABLE_THEMES) 1194 #if defined(ENABLE_THEMES)
1194 // Set up the chrome://theme/ source. 1195 // Set up the chrome://theme/ source.
1195 ThemeSource* theme = new ThemeSource(profile); 1196 ThemeSource* theme = new ThemeSource(profile);
1196 content::URLDataSource::Add(profile, theme); 1197 content::URLDataSource::Add(profile, theme);
1197 #endif 1198 #endif
1198 1199
1199 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile)); 1200 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile));
1200 } 1201 }
OLDNEW
« no previous file with comments | « chrome/browser/policy/config_dir_policy_loader.cc ('k') | chrome/browser/value_store/testing_value_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698