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

Side by Side Diff: chrome/browser/chromeos/profiles/profile_helper.cc

Issue 14242010: ProfileHelper::GetProfileByUserIdHash fix (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/chromeos/profiles/profile_helper.h" 5 #include "chrome/browser/chromeos/profiles/profile_helper.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/chromeos/cros/cros_library.h" 9 #include "chrome/browser/chromeos/cros/cros_library.h"
10 #include "chrome/browser/chromeos/cros/network_library.h" 10 #include "chrome/browser/chromeos/cros/network_library.h"
(...skipping 25 matching lines...) Expand all
36 ProfileHelper::ProfileHelper() { 36 ProfileHelper::ProfileHelper() {
37 } 37 }
38 38
39 ProfileHelper::~ProfileHelper() { 39 ProfileHelper::~ProfileHelper() {
40 } 40 }
41 41
42 // static 42 // static
43 Profile* ProfileHelper::GetProfileByUserIdHash( 43 Profile* ProfileHelper::GetProfileByUserIdHash(
44 const std::string& user_id_hash) { 44 const std::string& user_id_hash) {
45 ProfileManager* profile_manager = g_browser_process->profile_manager(); 45 ProfileManager* profile_manager = g_browser_process->profile_manager();
46 return profile_manager->GetProfile(base::FilePath(user_id_hash)); 46 return profile_manager->GetProfile(
47 GetChromeOSProfileDir(base::FilePath(user_id_hash)));
47 } 48 }
48 49
49 // static 50 // static
50 Profile* ProfileHelper::GetSigninProfile() { 51 Profile* ProfileHelper::GetSigninProfile() {
51 ProfileManager* profile_manager = g_browser_process->profile_manager(); 52 ProfileManager* profile_manager = g_browser_process->profile_manager();
52 base::FilePath user_data_dir = profile_manager->user_data_dir(); 53 base::FilePath user_data_dir = profile_manager->user_data_dir();
53 base::FilePath signin_profile_dir = 54 base::FilePath signin_profile_dir =
54 user_data_dir.AppendASCII(chrome::kInitialProfile); 55 user_data_dir.AppendASCII(chrome::kInitialProfile);
55 return profile_manager->GetProfile(signin_profile_dir)-> 56 return profile_manager->GetProfile(signin_profile_dir)->
56 GetOffTheRecordProfile(); 57 GetOffTheRecordProfile();
(...skipping 24 matching lines...) Expand all
81 82
82 //////////////////////////////////////////////////////////////////////////////// 83 ////////////////////////////////////////////////////////////////////////////////
83 // ProfileHelper, UserManager::UserSessionStateObserver implementation: 84 // ProfileHelper, UserManager::UserSessionStateObserver implementation:
84 85
85 void ProfileHelper::ActiveUserHashChanged(const std::string& hash) { 86 void ProfileHelper::ActiveUserHashChanged(const std::string& hash) {
86 active_user_id_hash_ = hash; 87 active_user_id_hash_ = hash;
87 LOG(INFO) << "Switching to custom profile_dir: " << active_user_id_hash_; 88 LOG(INFO) << "Switching to custom profile_dir: " << active_user_id_hash_;
88 } 89 }
89 90
90 } // namespace chromeos 91 } // namespace chromeos
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