| 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/chrome_browser_main.h" | 5 #include "chrome/browser/chrome_browser_main.h" |
| 6 | 6 |
| 7 #if defined(TOOLKIT_GTK) | 7 #if defined(TOOLKIT_GTK) |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 user_data_dir); | 380 user_data_dir); |
| 381 #else | 381 #else |
| 382 base::FilePath profile_path = | 382 base::FilePath profile_path = |
| 383 GetStartupProfilePath(user_data_dir, parsed_command_line); | 383 GetStartupProfilePath(user_data_dir, parsed_command_line); |
| 384 profile = g_browser_process->profile_manager()->GetProfile( | 384 profile = g_browser_process->profile_manager()->GetProfile( |
| 385 profile_path); | 385 profile_path); |
| 386 #endif | 386 #endif |
| 387 if (profile) | 387 if (profile) |
| 388 return profile; | 388 return profile; |
| 389 | 389 |
| 390 #if !defined(OS_WIN) |
| 390 // TODO(port): fix this. See comments near the definition of | 391 // TODO(port): fix this. See comments near the definition of |
| 391 // user_data_dir. It is better to CHECK-fail here than it is to | 392 // user_data_dir. It is better to CHECK-fail here than it is to |
| 392 // silently exit because of missing code in the above test. | 393 // silently exit because of missing code in the above test. |
| 393 CHECK(profile) << "Cannot get default profile."; | 394 CHECK(profile) << "Cannot get default profile."; |
| 395 #endif |
| 394 | 396 |
| 395 return NULL; | 397 return NULL; |
| 396 } | 398 } |
| 397 | 399 |
| 398 #if defined(OS_MACOSX) | 400 #if defined(OS_MACOSX) |
| 399 OSStatus KeychainCallback(SecKeychainEvent keychain_event, | 401 OSStatus KeychainCallback(SecKeychainEvent keychain_event, |
| 400 SecKeychainCallbackInfo* info, void* context) { | 402 SecKeychainCallbackInfo* info, void* context) { |
| 401 return noErr; | 403 return noErr; |
| 402 } | 404 } |
| 403 #endif | 405 #endif |
| (...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1792 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1794 if (base::win::GetVersion() <= base::win::VERSION_XP) |
| 1793 uma_name += "_XP"; | 1795 uma_name += "_XP"; |
| 1794 | 1796 |
| 1795 uma_name += "_PreRead_"; | 1797 uma_name += "_PreRead_"; |
| 1796 uma_name += pre_read_percentage; | 1798 uma_name += pre_read_percentage; |
| 1797 AddPreReadHistogramTime(uma_name.c_str(), time); | 1799 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 1798 } | 1800 } |
| 1799 #endif | 1801 #endif |
| 1800 #endif | 1802 #endif |
| 1801 } | 1803 } |
| OLD | NEW |