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

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

Issue 878143003: [Win] Fix crash if the profile dir cannot be created (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 profile_path = g_browser_process->profile_manager()->GetProfileInfoCache(). 357 profile_path = g_browser_process->profile_manager()->GetProfileInfoCache().
358 GetPathOfProfileAtIndex(0); 358 GetPathOfProfileAtIndex(0);
359 } 359 }
360 profile = g_browser_process->profile_manager()->GetProfile( 360 profile = g_browser_process->profile_manager()->GetProfile(
361 profile_path); 361 profile_path);
362 362
363 // If we're using the --new-profile-management flag and this profile is 363 // If we're using the --new-profile-management flag and this profile is
364 // signed out, then we should show the user manager instead. By switching 364 // signed out, then we should show the user manager instead. By switching
365 // the active profile to the guest profile we ensure that no 365 // the active profile to the guest profile we ensure that no
366 // browser windows will be opened for the guest profile. 366 // browser windows will be opened for the guest profile.
367 if (switches::IsNewProfileManagement() && !profile->IsGuestSession()) { 367 if (switches::IsNewProfileManagement() &&
368 profile &&
369 !profile->IsGuestSession()) {
368 ProfileInfoCache& cache = 370 ProfileInfoCache& cache =
369 g_browser_process->profile_manager()->GetProfileInfoCache(); 371 g_browser_process->profile_manager()->GetProfileInfoCache();
370 size_t profile_index = cache.GetIndexOfProfileWithPath(profile_path); 372 size_t profile_index = cache.GetIndexOfProfileWithPath(profile_path);
371 373
372 if (cache.ProfileIsSigninRequiredAtIndex(profile_index)) 374 if (cache.ProfileIsSigninRequiredAtIndex(profile_index))
373 profile = g_browser_process->profile_manager()->GetProfile( 375 profile = g_browser_process->profile_manager()->GetProfile(
374 ProfileManager::GetGuestProfilePath()); 376 ProfileManager::GetGuestProfilePath());
375 } 377 }
376 #endif 378 #endif
377 if (profile) { 379 if (profile) {
(...skipping 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after
1710 chromeos::CrosSettings::Shutdown(); 1712 chromeos::CrosSettings::Shutdown();
1711 #endif 1713 #endif
1712 #endif 1714 #endif
1713 } 1715 }
1714 1716
1715 // Public members: 1717 // Public members:
1716 1718
1717 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1719 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1718 chrome_extra_parts_.push_back(parts); 1720 chrome_extra_parts_.push_back(parts);
1719 } 1721 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698