| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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/extensions/extension_assets_manager_chromeos.h" | 5 #include "chrome/browser/extensions/extension_assets_manager_chromeos.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 281 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 282 | 282 |
| 283 const std::string& user_id = profile->GetProfileName(); | 283 const std::string& user_id = profile->GetProfileName(); |
| 284 user_manager::UserManager* user_manager = user_manager::UserManager::Get(); | 284 user_manager::UserManager* user_manager = user_manager::UserManager::Get(); |
| 285 if (!user_manager) { | 285 if (!user_manager) { |
| 286 NOTREACHED(); | 286 NOTREACHED(); |
| 287 return; | 287 return; |
| 288 } | 288 } |
| 289 | 289 |
| 290 if (user_manager->IsUserNonCryptohomeDataEphemeral(user_id) || | 290 if (user_manager->IsUserNonCryptohomeDataEphemeral(user_id) || |
| 291 !user_manager->IsLoggedInAsRegularUser()) { | 291 !user_manager->IsLoggedInAsUserWithGaiaAccount()) { |
| 292 // Don't cache anything in shared location for ephemeral user or special | 292 // Don't cache anything in shared location for ephemeral user or special |
| 293 // user types. | 293 // user types. |
| 294 ExtensionAssetsManagerChromeOS::GetFileTaskRunner(profile)->PostTask( | 294 ExtensionAssetsManagerChromeOS::GetFileTaskRunner(profile)->PostTask( |
| 295 FROM_HERE, | 295 FROM_HERE, |
| 296 base::Bind(&ExtensionAssetsManagerChromeOS::InstallLocalExtension, | 296 base::Bind(&ExtensionAssetsManagerChromeOS::InstallLocalExtension, |
| 297 id, | 297 id, |
| 298 version, | 298 version, |
| 299 unpacked_extension_root, | 299 unpacked_extension_root, |
| 300 local_install_dir, | 300 local_install_dir, |
| 301 callback)); | 301 callback)); |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 std::make_pair(id, base::FilePath(shared_path))); | 566 std::make_pair(id, base::FilePath(shared_path))); |
| 567 } else { | 567 } else { |
| 568 extension_info->RemoveWithoutPathExpansion(*it, NULL); | 568 extension_info->RemoveWithoutPathExpansion(*it, NULL); |
| 569 } | 569 } |
| 570 } | 570 } |
| 571 | 571 |
| 572 return true; | 572 return true; |
| 573 } | 573 } |
| 574 | 574 |
| 575 } // namespace extensions | 575 } // namespace extensions |
| OLD | NEW |