| 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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   350 #if defined(OS_CHROMEOS) |   350 #if defined(OS_CHROMEOS) | 
|   351   // TODO(ivankr): http://crbug.com/83792 |   351   // TODO(ivankr): http://crbug.com/83792 | 
|   352   profile = g_browser_process->profile_manager()->GetDefaultProfile( |   352   profile = g_browser_process->profile_manager()->GetDefaultProfile( | 
|   353       user_data_dir); |   353       user_data_dir); | 
|   354 #else |   354 #else | 
|   355   base::FilePath profile_path = |   355   base::FilePath profile_path = | 
|   356       GetStartupProfilePath(user_data_dir, parsed_command_line); |   356       GetStartupProfilePath(user_data_dir, parsed_command_line); | 
|   357   profile = g_browser_process->profile_manager()->GetProfile( |   357   profile = g_browser_process->profile_manager()->GetProfile( | 
|   358       profile_path); |   358       profile_path); | 
|   359 #endif |   359 #endif | 
|   360   if (profile) |   360   if (profile) { | 
 |   361 #if defined(OS_WIN) | 
 |   362     // Ensure the icon file for the profile has been created. | 
 |   363     ProfileShortcutManager* profile_shortcut_manager = | 
 |   364         g_browser_process->profile_manager()->profile_shortcut_manager(); | 
 |   365     profile_shortcut_manager->CreateProfileIcon(profile->GetPath()); | 
 |   366 #endif | 
|   361     return profile; |   367     return profile; | 
 |   368   } | 
|   362  |   369  | 
|   363 #if !defined(OS_WIN) |   370 #if !defined(OS_WIN) | 
|   364   // TODO(port): fix this.  See comments near the definition of |   371   // TODO(port): fix this.  See comments near the definition of | 
|   365   // user_data_dir.  It is better to CHECK-fail here than it is to |   372   // user_data_dir.  It is better to CHECK-fail here than it is to | 
|   366   // silently exit because of missing code in the above test. |   373   // silently exit because of missing code in the above test. | 
|   367   CHECK(profile) << "Cannot get default profile."; |   374   CHECK(profile) << "Cannot get default profile."; | 
|   368 #endif |   375 #endif | 
|   369  |   376  | 
|   370   return NULL; |   377   return NULL; | 
|   371 } |   378 } | 
| (...skipping 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1747     if (base::win::GetVersion() <= base::win::VERSION_XP) |  1754     if (base::win::GetVersion() <= base::win::VERSION_XP) | 
|  1748       uma_name += "_XP"; |  1755       uma_name += "_XP"; | 
|  1749  |  1756  | 
|  1750     uma_name += "_PreRead_"; |  1757     uma_name += "_PreRead_"; | 
|  1751     uma_name += pre_read_percentage; |  1758     uma_name += pre_read_percentage; | 
|  1752     AddPreReadHistogramTime(uma_name.c_str(), time); |  1759     AddPreReadHistogramTime(uma_name.c_str(), time); | 
|  1753   } |  1760   } | 
|  1754 #endif |  1761 #endif | 
|  1755 #endif |  1762 #endif | 
|  1756 } |  1763 } | 
| OLD | NEW |