| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 | 6 |
| 7 //------------------------------------------------------------------------------ | 7 //------------------------------------------------------------------------------ |
| 8 // Description of the life cycle of a instance of MetricsService. | 8 // Description of the life cycle of a instance of MetricsService. |
| 9 // | 9 // |
| 10 // OVERVIEW | 10 // OVERVIEW |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 // | 155 // |
| 156 //------------------------------------------------------------------------------ | 156 //------------------------------------------------------------------------------ |
| 157 | 157 |
| 158 #include "chrome/browser/metrics/metrics_service.h" | 158 #include "chrome/browser/metrics/metrics_service.h" |
| 159 | 159 |
| 160 #if defined(OS_WIN) | 160 #if defined(OS_WIN) |
| 161 #include <windows.h> | 161 #include <windows.h> |
| 162 #include <objbase.h> | 162 #include <objbase.h> |
| 163 #endif | 163 #endif |
| 164 | 164 |
| 165 #if defined(USE_SYSTEM_LIBBZ2) |
| 166 #include <bzlib.h> |
| 167 #else |
| 168 #include "third_party/bzip2/bzlib.h" |
| 169 #endif |
| 170 |
| 165 #include "base/file_path.h" | 171 #include "base/file_path.h" |
| 166 #include "base/histogram.h" | 172 #include "base/histogram.h" |
| 167 #include "base/path_service.h" | 173 #include "base/path_service.h" |
| 168 #include "base/platform_thread.h" | 174 #include "base/platform_thread.h" |
| 169 #include "base/rand_util.h" | 175 #include "base/rand_util.h" |
| 170 #include "base/string_util.h" | 176 #include "base/string_util.h" |
| 171 #include "base/task.h" | 177 #include "base/task.h" |
| 172 #include "chrome/browser/bookmarks/bookmark_model.h" | 178 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 173 #include "chrome/browser/browser.h" | 179 #include "chrome/browser/browser.h" |
| 174 #include "chrome/browser/browser_list.h" | 180 #include "chrome/browser/browser_list.h" |
| 175 #include "chrome/browser/browser_process.h" | 181 #include "chrome/browser/browser_process.h" |
| 176 #include "chrome/browser/load_notification_details.h" | 182 #include "chrome/browser/load_notification_details.h" |
| 177 #include "chrome/browser/memory_details.h" | 183 #include "chrome/browser/memory_details.h" |
| 178 #include "chrome/browser/plugin_service.h" | 184 #include "chrome/browser/plugin_service.h" |
| 179 #include "chrome/browser/profile.h" | 185 #include "chrome/browser/profile.h" |
| 180 #include "chrome/browser/renderer_host/render_process_host.h" | 186 #include "chrome/browser/renderer_host/render_process_host.h" |
| 181 #include "chrome/browser/search_engines/template_url.h" | 187 #include "chrome/browser/search_engines/template_url.h" |
| 182 #include "chrome/browser/search_engines/template_url_model.h" | 188 #include "chrome/browser/search_engines/template_url_model.h" |
| 183 #include "chrome/common/child_process_info.h" | 189 #include "chrome/common/child_process_info.h" |
| 184 #include "chrome/common/chrome_paths.h" | 190 #include "chrome/common/chrome_paths.h" |
| 185 #include "chrome/common/chrome_switches.h" | 191 #include "chrome/common/chrome_switches.h" |
| 186 #include "chrome/common/histogram_synchronizer.h" | 192 #include "chrome/common/histogram_synchronizer.h" |
| 187 #include "chrome/common/libxml_utils.h" | 193 #include "chrome/common/libxml_utils.h" |
| 188 #include "chrome/common/notification_service.h" | 194 #include "chrome/common/notification_service.h" |
| 189 #include "chrome/common/pref_names.h" | 195 #include "chrome/common/pref_names.h" |
| 190 #include "chrome/common/pref_service.h" | 196 #include "chrome/common/pref_service.h" |
| 191 #include "chrome/common/render_messages.h" | 197 #include "chrome/common/render_messages.h" |
| 192 #include "googleurl/src/gurl.h" | 198 #include "googleurl/src/gurl.h" |
| 193 #include "net/base/load_flags.h" | 199 #include "net/base/load_flags.h" |
| 194 #include "third_party/bzip2/bzlib.h" | |
| 195 | 200 |
| 196 #if defined(OS_POSIX) | 201 #if defined(OS_POSIX) |
| 197 // TODO(port): Move these headers above as they are ported. | 202 // TODO(port): Move these headers above as they are ported. |
| 198 #include "chrome/common/temp_scaffolding_stubs.h" | 203 #include "chrome/common/temp_scaffolding_stubs.h" |
| 199 #else | 204 #else |
| 200 #include "chrome/installer/util/browser_distribution.h" | 205 #include "chrome/installer/util/browser_distribution.h" |
| 201 #include "chrome/installer/util/google_update_settings.h" | 206 #include "chrome/installer/util/google_update_settings.h" |
| 202 #endif | 207 #endif |
| 203 | 208 |
| 204 using base::Time; | 209 using base::Time; |
| (...skipping 1714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1919 L"." + key; | 1924 L"." + key; |
| 1920 prof_prefs->SetInteger(pref_key.c_str(), value); | 1925 prof_prefs->SetInteger(pref_key.c_str(), value); |
| 1921 } | 1926 } |
| 1922 | 1927 |
| 1923 static bool IsSingleThreaded() { | 1928 static bool IsSingleThreaded() { |
| 1924 static PlatformThreadId thread_id = 0; | 1929 static PlatformThreadId thread_id = 0; |
| 1925 if (!thread_id) | 1930 if (!thread_id) |
| 1926 thread_id = PlatformThread::CurrentId(); | 1931 thread_id = PlatformThread::CurrentId(); |
| 1927 return PlatformThread::CurrentId() == thread_id; | 1932 return PlatformThread::CurrentId() == thread_id; |
| 1928 } | 1933 } |
| OLD | NEW |