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

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

Issue 372103006: Stamp out CreateStringValue in chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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/version_handler.h" 5 #include "chrome/browser/ui/webui/version_handler.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 variations.push_back(line); 100 variations.push_back(line);
101 } 101 }
102 #else 102 #else
103 // In release mode, display the hashes only. 103 // In release mode, display the hashes only.
104 variations::GetFieldTrialActiveGroupIdsAsStrings(&variations); 104 variations::GetFieldTrialActiveGroupIdsAsStrings(&variations);
105 #endif 105 #endif
106 106
107 base::ListValue variations_list; 107 base::ListValue variations_list;
108 for (std::vector<std::string>::const_iterator it = variations.begin(); 108 for (std::vector<std::string>::const_iterator it = variations.begin();
109 it != variations.end(); ++it) { 109 it != variations.end(); ++it) {
110 variations_list.Append(base::Value::CreateStringValue(*it)); 110 variations_list.Append(new base::StringValue(*it));
111 } 111 }
112 112
113 // In release mode, this will return an empty list to clear the section. 113 // In release mode, this will return an empty list to clear the section.
114 web_ui()->CallJavascriptFunction("returnVariationInfo", variations_list); 114 web_ui()->CallJavascriptFunction("returnVariationInfo", variations_list);
115 } 115 }
116 116
117 void VersionHandler::OnGotFilePaths(base::string16* executable_path_data, 117 void VersionHandler::OnGotFilePaths(base::string16* executable_path_data,
118 base::string16* profile_path_data) { 118 base::string16* profile_path_data) {
119 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 119 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
120 120
(...skipping 19 matching lines...) Expand all
140 flash_version = info_array[i].version; 140 flash_version = info_array[i].version;
141 break; 141 break;
142 } 142 }
143 } 143 }
144 } 144 }
145 145
146 base::StringValue arg(flash_version); 146 base::StringValue arg(flash_version);
147 web_ui()->CallJavascriptFunction("returnFlashVersion", arg); 147 web_ui()->CallJavascriptFunction("returnFlashVersion", arg);
148 } 148 }
149 #endif // defined(ENABLE_PLUGINS) 149 #endif // defined(ENABLE_PLUGINS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698