| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/chrome_browser_field_trials_desktop.h" | 5 #include "chrome/browser/chrome_browser_field_trials_desktop.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 CHECK(::GetModuleFileName(nullptr, exe_file, arraysize(exe_file))); | 157 CHECK(::GetModuleFileName(nullptr, exe_file, arraysize(exe_file))); |
| 158 | 158 |
| 159 base::string16 product_name; | 159 base::string16 product_name; |
| 160 base::string16 version_number; | 160 base::string16 version_number; |
| 161 base::string16 channel_name; | 161 base::string16 channel_name; |
| 162 base::string16 special_build; | 162 base::string16 special_build; |
| 163 install_static::GetExecutableVersionDetails(exe_file, &product_name, | 163 install_static::GetExecutableVersionDetails(exe_file, &product_name, |
| 164 &version_number, &special_build, | 164 &version_number, &special_build, |
| 165 &channel_name); | 165 &channel_name); |
| 166 | 166 |
| 167 base::debug::ActivityUserData& global_data = global_tracker->global_data(); | 167 base::debug::ActivityUserData& proc_data = global_tracker->process_data(); |
| 168 global_data.SetString(browser_watcher::kStabilityProduct, product_name); | 168 proc_data.SetString(browser_watcher::kStabilityProduct, product_name); |
| 169 global_data.SetString(browser_watcher::kStabilityVersion, version_number); | 169 proc_data.SetString(browser_watcher::kStabilityVersion, version_number); |
| 170 global_data.SetString(browser_watcher::kStabilityChannel, channel_name); | 170 proc_data.SetString(browser_watcher::kStabilityChannel, channel_name); |
| 171 global_data.SetString(browser_watcher::kStabilitySpecialBuild, | 171 proc_data.SetString(browser_watcher::kStabilitySpecialBuild, special_build); |
| 172 special_build); | |
| 173 #if defined(ARCH_CPU_X86) | 172 #if defined(ARCH_CPU_X86) |
| 174 global_data.SetString(browser_watcher::kStabilityPlatform, "Win32"); | 173 proc_data.SetString(browser_watcher::kStabilityPlatform, "Win32"); |
| 175 #elif defined(ARCH_CPU_X86_64) | 174 #elif defined(ARCH_CPU_X86_64) |
| 176 global_data.SetString(browser_watcher::kStabilityPlatform, "Win64"); | 175 proc_data.SetString(browser_watcher::kStabilityPlatform, "Win64"); |
| 177 #endif | 176 #endif |
| 178 global_data.SetInt(browser_watcher::kStabilityStartTimestamp, | 177 proc_data.SetInt(browser_watcher::kStabilityStartTimestamp, |
| 179 base::Time::Now().ToInternalValue()); | 178 base::Time::Now().ToInternalValue()); |
| 180 | 179 |
| 181 // Record information about chrome's module. We want this to be done early. | 180 // Record information about chrome's module. We want this to be done early. |
| 182 RecordChromeModuleInfo(global_tracker); | 181 RecordChromeModuleInfo(global_tracker); |
| 183 | 182 |
| 184 // Trigger a flush of the memory mapped file to maximize the chances of | 183 // Trigger a flush of the memory mapped file to maximize the chances of |
| 185 // having a minimal amount of content in the stability file, even if | 184 // having a minimal amount of content in the stability file, even if |
| 186 // the system crashes or loses power. Note: this does not flush the file | 185 // the system crashes or loses power. Note: this does not flush the file |
| 187 // metadata nor does it wait for the changes to be flushed to disk before | 186 // metadata nor does it wait for the changes to be flushed to disk before |
| 188 // returning. This is an expensive operation. Run as an experiment to | 187 // returning. This is an expensive operation. Run as an experiment to |
| 189 // measure the effect on performance and collection. | 188 // measure the effect on performance and collection. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 201 void SetupDesktopFieldTrials() { | 200 void SetupDesktopFieldTrials() { |
| 202 prerender::ConfigurePrerender(); | 201 prerender::ConfigurePrerender(); |
| 203 SetupStunProbeTrial(); | 202 SetupStunProbeTrial(); |
| 204 #if defined(OS_WIN) | 203 #if defined(OS_WIN) |
| 205 SetupStabilityDebugging(); | 204 SetupStabilityDebugging(); |
| 206 base::FeatureList::IsEnabled(features::kModuleDatabase); | 205 base::FeatureList::IsEnabled(features::kModuleDatabase); |
| 207 #endif // defined(OS_WIN) | 206 #endif // defined(OS_WIN) |
| 208 } | 207 } |
| 209 | 208 |
| 210 } // namespace chrome | 209 } // namespace chrome |
| OLD | NEW |