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 //------------------------------------------------------------------------------ | 5 //------------------------------------------------------------------------------ |
6 // Description of the life cycle of a instance of MetricsService. | 6 // Description of the life cycle of a instance of MetricsService. |
7 // | 7 // |
8 // OVERVIEW | 8 // OVERVIEW |
9 // | 9 // |
10 // A MetricsService instance is typically created at application startup. It | 10 // A MetricsService instance is typically created at application startup. It |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
208 #endif | 208 #endif |
209 | 209 |
210 #if defined(OS_CHROMEOS) | 210 #if defined(OS_CHROMEOS) |
211 #include "chrome/browser/chromeos/cros/cros_library.h" | 211 #include "chrome/browser/chromeos/cros/cros_library.h" |
212 #include "chrome/browser/chromeos/external_metrics.h" | 212 #include "chrome/browser/chromeos/external_metrics.h" |
213 #include "chrome/browser/chromeos/system/statistics_provider.h" | 213 #include "chrome/browser/chromeos/system/statistics_provider.h" |
214 #endif | 214 #endif |
215 | 215 |
216 #if defined(OS_WIN) | 216 #if defined(OS_WIN) |
217 #include <windows.h> // Needed for STATUS_* codes | 217 #include <windows.h> // Needed for STATUS_* codes |
218 #include "sandbox/win/src/sandbox_types.h" // For termination codes. | |
218 #endif | 219 #endif |
219 | 220 |
220 using base::Time; | 221 using base::Time; |
221 using content::BrowserThread; | 222 using content::BrowserThread; |
222 using content::ChildProcessData; | 223 using content::ChildProcessData; |
223 using content::LoadNotificationDetails; | 224 using content::LoadNotificationDetails; |
224 using content::PluginService; | 225 using content::PluginService; |
225 | 226 |
226 namespace { | 227 namespace { |
227 | 228 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
339 STATUS_IN_PAGE_ERROR, | 340 STATUS_IN_PAGE_ERROR, |
340 STATUS_NONCONTINUABLE_EXCEPTION, | 341 STATUS_NONCONTINUABLE_EXCEPTION, |
341 STATUS_NO_MEMORY, | 342 STATUS_NO_MEMORY, |
342 STATUS_PRIVILEGED_INSTRUCTION, | 343 STATUS_PRIVILEGED_INSTRUCTION, |
343 STATUS_SINGLE_STEP, | 344 STATUS_SINGLE_STEP, |
344 STATUS_STACK_OVERFLOW, | 345 STATUS_STACK_OVERFLOW, |
345 }; | 346 }; |
346 | 347 |
347 for (size_t i = 0; i < arraysize(kExceptionCodes); ++i) | 348 for (size_t i = 0; i < arraysize(kExceptionCodes); ++i) |
348 codes.push_back(MapCrashExitCodeForHistogram(kExceptionCodes[i])); | 349 codes.push_back(MapCrashExitCodeForHistogram(kExceptionCodes[i])); |
350 | |
351 // Add the sandbox fatal termination codes. | |
352 for (int i = sandbox::SBOX_FATAL_INTEGRITY; | |
rvargas (doing something else)
2012/09/28 18:12:12
Does it matter that these values are numerically l
eroman
2012/09/28 19:28:29
It doesn't matter, since CustomHistogram internall
| |
353 i <= sandbox::SBOX_FATAL_LAST; ++i) { | |
354 codes.push_back(MapCrashExitCodeForHistogram(i)); | |
355 } | |
349 #endif | 356 #endif |
350 | 357 |
351 return codes; | 358 return codes; |
352 } | 359 } |
353 | 360 |
354 } // namespace | 361 } // namespace |
355 | 362 |
356 // static | 363 // static |
357 MetricsService::ShutdownCleanliness MetricsService::clean_shutdown_status_ = | 364 MetricsService::ShutdownCleanliness MetricsService::clean_shutdown_status_ = |
358 MetricsService::CLEANLY_SHUTDOWN; | 365 MetricsService::CLEANLY_SHUTDOWN; |
(...skipping 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1942 if (local_state) { | 1949 if (local_state) { |
1943 const PrefService::Preference* uma_pref = | 1950 const PrefService::Preference* uma_pref = |
1944 local_state->FindPreference(prefs::kMetricsReportingEnabled); | 1951 local_state->FindPreference(prefs::kMetricsReportingEnabled); |
1945 if (uma_pref) { | 1952 if (uma_pref) { |
1946 bool success = uma_pref->GetValue()->GetAsBoolean(&result); | 1953 bool success = uma_pref->GetValue()->GetAsBoolean(&result); |
1947 DCHECK(success); | 1954 DCHECK(success); |
1948 } | 1955 } |
1949 } | 1956 } |
1950 return result; | 1957 return result; |
1951 } | 1958 } |
OLD | NEW |