| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   89 #if !defined(NDEBUG) |   89 #if !defined(NDEBUG) | 
|   90   base::FieldTrial::ActiveGroups active_groups; |   90   base::FieldTrial::ActiveGroups active_groups; | 
|   91   base::FieldTrialList::GetActiveFieldTrialGroups(&active_groups); |   91   base::FieldTrialList::GetActiveFieldTrialGroups(&active_groups); | 
|   92  |   92  | 
|   93   const unsigned char kNonBreakingHyphenUTF8[] = { 0xE2, 0x80, 0x91, '\0' }; |   93   const unsigned char kNonBreakingHyphenUTF8[] = { 0xE2, 0x80, 0x91, '\0' }; | 
|   94   const std::string kNonBreakingHyphenUTF8String( |   94   const std::string kNonBreakingHyphenUTF8String( | 
|   95       reinterpret_cast<const char*>(kNonBreakingHyphenUTF8)); |   95       reinterpret_cast<const char*>(kNonBreakingHyphenUTF8)); | 
|   96   for (size_t i = 0; i < active_groups.size(); ++i) { |   96   for (size_t i = 0; i < active_groups.size(); ++i) { | 
|   97     std::string line = active_groups[i].trial_name + ":" + |   97     std::string line = active_groups[i].trial_name + ":" + | 
|   98                        active_groups[i].group_name; |   98                        active_groups[i].group_name; | 
|   99     ReplaceChars(line, "-", kNonBreakingHyphenUTF8String, &line); |   99     base::ReplaceChars(line, "-", kNonBreakingHyphenUTF8String, &line); | 
|  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   chrome_variations::GetFieldTrialActiveGroupIdsAsStrings(&variations); |  104   chrome_variations::GetFieldTrialActiveGroupIdsAsStrings(&variations); | 
|  105 #endif |  105 #endif | 
|  106  |  106  | 
|  107   ListValue variations_list; |  107   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) { | 
| (...skipping 30 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   StringValue arg(flash_version); |  146   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 |