Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 14137032: Create profile .ico file on profile creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rework Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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.
Alexei Svitkine (slow) 2013/05/09 16:45:47 Does ProfileImpl::OnPrefsLoaded() not get called i
calamity 2013/05/24 08:58:48 Yep, sorry. I got confused. ProfileManager::OnProf
363 ProfileShortcutManager* profile_shortcut_manager =
364 g_browser_process->profile_manager()->profile_shortcut_manager();
365 if (profile_shortcut_manager)
366 profile_shortcut_manager->CreateProfileIcon(profile->GetPath());
367 #endif
361 return profile; 368 return profile;
369 }
362 370
363 #if !defined(OS_WIN) 371 #if !defined(OS_WIN)
364 // TODO(port): fix this. See comments near the definition of 372 // 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 373 // 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. 374 // silently exit because of missing code in the above test.
367 CHECK(profile) << "Cannot get default profile."; 375 CHECK(profile) << "Cannot get default profile.";
368 #endif 376 #endif
369 377
370 return NULL; 378 return NULL;
371 } 379 }
(...skipping 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after
1747 if (base::win::GetVersion() <= base::win::VERSION_XP) 1755 if (base::win::GetVersion() <= base::win::VERSION_XP)
1748 uma_name += "_XP"; 1756 uma_name += "_XP";
1749 1757
1750 uma_name += "_PreRead_"; 1758 uma_name += "_PreRead_";
1751 uma_name += pre_read_percentage; 1759 uma_name += pre_read_percentage;
1752 AddPreReadHistogramTime(uma_name.c_str(), time); 1760 AddPreReadHistogramTime(uma_name.c_str(), time);
1753 } 1761 }
1754 #endif 1762 #endif
1755 #endif 1763 #endif
1756 } 1764 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_impl.cc » ('j') | chrome/browser/profiles/profile_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698