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

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

Issue 2918203002: cros: Fix loading user profile w/o UserSessionManager (Closed)
Patch Set: rebase Created 3 years, 6 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 | chrome/browser/chromeos/accessibility/accessibility_manager_browsertest.cc » ('j') | 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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 // profile. 420 // profile.
421 ListPrefUpdate update(g_browser_process->local_state(), 421 ListPrefUpdate update(g_browser_process->local_state(),
422 prefs::kProfilesLastActive); 422 prefs::kProfilesLastActive);
423 base::ListValue* profile_list = update.Get(); 423 base::ListValue* profile_list = update.Get();
424 profile_list->Clear(); 424 profile_list->Clear();
425 } 425 }
426 426
427 Profile* profile = nullptr; 427 Profile* profile = nullptr;
428 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) 428 #if defined(OS_CHROMEOS) || defined(OS_ANDROID)
429 // On ChromeOS and Android the ProfileManager will use the same path as the 429 // On ChromeOS and Android the ProfileManager will use the same path as the
430 // one we got passed. GetActiveUserProfile will therefore use the correct path 430 // one we got passed. CreateInitialProfile will therefore use the correct path
431 // automatically. 431 // automatically.
432 DCHECK_EQ(user_data_dir.value(), 432 DCHECK_EQ(user_data_dir.value(),
433 g_browser_process->profile_manager()->user_data_dir().value()); 433 g_browser_process->profile_manager()->user_data_dir().value());
434 profile = ProfileManager::GetActiveUserProfile(); 434 profile = ProfileManager::CreateInitialProfile();
435 435
436 // TODO(port): fix this. See comments near the definition of |user_data_dir|. 436 // TODO(port): fix this. See comments near the definition of |user_data_dir|.
437 // It is better to CHECK-fail here than it is to silently exit because of 437 // It is better to CHECK-fail here than it is to silently exit because of
438 // missing code in the above test. 438 // missing code in the above test.
439 CHECK(profile) << "Cannot get default profile."; 439 CHECK(profile) << "Cannot get default profile.";
440 440
441 #else 441 #else
442 profile = GetStartupProfile(user_data_dir, parsed_command_line); 442 profile = GetStartupProfile(user_data_dir, parsed_command_line);
443 443
444 if (!profile && !profile_dir_specified) 444 if (!profile && !profile_dir_specified)
(...skipping 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after
2063 chromeos::CrosSettings::Shutdown(); 2063 chromeos::CrosSettings::Shutdown();
2064 #endif // defined(OS_CHROMEOS) 2064 #endif // defined(OS_CHROMEOS)
2065 #endif // defined(OS_ANDROID) 2065 #endif // defined(OS_ANDROID)
2066 } 2066 }
2067 2067
2068 // Public members: 2068 // Public members:
2069 2069
2070 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 2070 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
2071 chrome_extra_parts_.push_back(parts); 2071 chrome_extra_parts_.push_back(parts);
2072 } 2072 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/accessibility/accessibility_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698