| 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 19 matching lines...) Expand all Loading... |
| 30 #include "media/media_features.h" | 30 #include "media/media_features.h" |
| 31 | 31 |
| 32 #if defined(OS_WIN) | 32 #if defined(OS_WIN) |
| 33 #include "base/win/pe_image.h" | 33 #include "base/win/pe_image.h" |
| 34 #include "chrome/install_static/install_util.h" | 34 #include "chrome/install_static/install_util.h" |
| 35 #include "components/browser_watcher/features.h" | 35 #include "components/browser_watcher/features.h" |
| 36 #include "components/browser_watcher/stability_data_names.h" | 36 #include "components/browser_watcher/stability_data_names.h" |
| 37 #include "components/browser_watcher/stability_debugging.h" | 37 #include "components/browser_watcher/stability_debugging.h" |
| 38 #include "components/browser_watcher/stability_metrics.h" | 38 #include "components/browser_watcher/stability_metrics.h" |
| 39 #include "components/browser_watcher/stability_paths.h" | 39 #include "components/browser_watcher/stability_paths.h" |
| 40 #include "components/browser_watcher/stability_report.pb.h" |
| 40 #endif | 41 #endif |
| 41 | 42 |
| 42 #if defined(OS_WIN) | 43 #if defined(OS_WIN) |
| 43 // http://blogs.msdn.com/oldnewthing/archive/2004/10/25/247180.aspx | 44 // http://blogs.msdn.com/oldnewthing/archive/2004/10/25/247180.aspx |
| 44 extern "C" IMAGE_DOS_HEADER __ImageBase; | 45 extern "C" IMAGE_DOS_HEADER __ImageBase; |
| 45 #endif | 46 #endif |
| 46 | 47 |
| 47 namespace chrome { | 48 namespace chrome { |
| 48 | 49 |
| 49 namespace { | 50 namespace { |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 proc_data.SetString(browser_watcher::kStabilityVersion, version_number); | 162 proc_data.SetString(browser_watcher::kStabilityVersion, version_number); |
| 162 proc_data.SetString(browser_watcher::kStabilityChannel, channel_name); | 163 proc_data.SetString(browser_watcher::kStabilityChannel, channel_name); |
| 163 proc_data.SetString(browser_watcher::kStabilitySpecialBuild, special_build); | 164 proc_data.SetString(browser_watcher::kStabilitySpecialBuild, special_build); |
| 164 #if defined(ARCH_CPU_X86) | 165 #if defined(ARCH_CPU_X86) |
| 165 proc_data.SetString(browser_watcher::kStabilityPlatform, "Win32"); | 166 proc_data.SetString(browser_watcher::kStabilityPlatform, "Win32"); |
| 166 #elif defined(ARCH_CPU_X86_64) | 167 #elif defined(ARCH_CPU_X86_64) |
| 167 proc_data.SetString(browser_watcher::kStabilityPlatform, "Win64"); | 168 proc_data.SetString(browser_watcher::kStabilityPlatform, "Win64"); |
| 168 #endif | 169 #endif |
| 169 proc_data.SetInt(browser_watcher::kStabilityStartTimestamp, | 170 proc_data.SetInt(browser_watcher::kStabilityStartTimestamp, |
| 170 base::Time::Now().ToInternalValue()); | 171 base::Time::Now().ToInternalValue()); |
| 172 proc_data.SetInt(browser_watcher::kStabilityProcessType, |
| 173 browser_watcher::ProcessState::BROWSER_PROCESS); |
| 171 | 174 |
| 172 // Record information about chrome's module. We want this to be done early. | 175 // Record information about chrome's module. We want this to be done early. |
| 173 RecordChromeModuleInfo(global_tracker); | 176 RecordChromeModuleInfo(global_tracker); |
| 174 | 177 |
| 175 // Trigger a flush of the memory mapped file to maximize the chances of | 178 // Trigger a flush of the memory mapped file to maximize the chances of |
| 176 // having a minimal amount of content in the stability file, even if | 179 // having a minimal amount of content in the stability file, even if |
| 177 // the system crashes or loses power. Note: this does not flush the file | 180 // the system crashes or loses power. Note: this does not flush the file |
| 178 // metadata nor does it wait for the changes to be flushed to disk before | 181 // metadata nor does it wait for the changes to be flushed to disk before |
| 179 // returning. This is an expensive operation. Run as an experiment to | 182 // returning. This is an expensive operation. Run as an experiment to |
| 180 // measure the effect on performance and collection. | 183 // measure the effect on performance and collection. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 200 void SetupDesktopFieldTrials() { | 203 void SetupDesktopFieldTrials() { |
| 201 prerender::ConfigurePrerender(); | 204 prerender::ConfigurePrerender(); |
| 202 SetupStunProbeTrial(); | 205 SetupStunProbeTrial(); |
| 203 #if defined(OS_WIN) | 206 #if defined(OS_WIN) |
| 204 SetupStabilityDebugging(); | 207 SetupStabilityDebugging(); |
| 205 base::FeatureList::IsEnabled(features::kModuleDatabase); | 208 base::FeatureList::IsEnabled(features::kModuleDatabase); |
| 206 #endif // defined(OS_WIN) | 209 #endif // defined(OS_WIN) |
| 207 } | 210 } |
| 208 | 211 |
| 209 } // namespace chrome | 212 } // namespace chrome |
| OLD | NEW |