OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/login/cookie_fetcher.h" | 5 #include "chrome/browser/chromeos/login/cookie_fetcher.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 fetcher_.reset(issue_handler_->Handle(data, this)); | 46 fetcher_.reset(issue_handler_->Handle(data, this)); |
47 return; | 47 return; |
48 } | 48 } |
49 } | 49 } |
50 LOG(INFO) << "Calling DoLaunch"; | 50 LOG(INFO) << "Calling DoLaunch"; |
51 launcher_->DoLaunch(profile_); | 51 launcher_->DoLaunch(profile_); |
52 delete this; | 52 delete this; |
53 } | 53 } |
54 | 54 |
55 void CookieFetcher::DelegateImpl::DoLaunch(Profile* profile) { | 55 void CookieFetcher::DelegateImpl::DoLaunch(Profile* profile) { |
56 if (profile == ProfileManager::GetDefaultProfile()) { | 56 FilePath user_data_dir; |
| 57 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); |
| 58 ProfileManager* profile_manager = g_browser_process->profile_manager(); |
| 59 if (profile == profile_manager->GetDefaultProfile(user_data_dir)) { |
57 LoginUtils::DoBrowserLaunch(profile); | 60 LoginUtils::DoBrowserLaunch(profile); |
58 } else { | 61 } else { |
59 LOG(ERROR) << | 62 LOG(ERROR) << |
60 "Profile has changed since we started populating it with cookies"; | 63 "Profile has changed since we started populating it with cookies"; |
61 } | 64 } |
62 } | 65 } |
63 | 66 |
64 } // namespace chromeos | 67 } // namespace chromeos |
OLD | NEW |