| 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/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 Loading... |
| 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 Loading... |
| 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) |
| OLD | NEW |