OLD | NEW |
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/extensions/component_loader.h" | 5 #include "chrome/browser/extensions/component_loader.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 CHECK(manifest) << error; | 84 CHECK(manifest) << error; |
85 bool localized = extension_l10n_util::LocalizeExtension( | 85 bool localized = extension_l10n_util::LocalizeExtension( |
86 chromevox_path, manifest.get(), &error); | 86 chromevox_path, manifest.get(), &error); |
87 CHECK(localized) << error; | 87 CHECK(localized) << error; |
88 return manifest.Pass(); | 88 return manifest.Pass(); |
89 } | 89 } |
90 | 90 |
91 bool IsNormalSession() { | 91 bool IsNormalSession() { |
92 return !base::CommandLine::ForCurrentProcess()->HasSwitch( | 92 return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
93 chromeos::switches::kGuestSession) && | 93 chromeos::switches::kGuestSession) && |
| 94 user_manager::UserManager::IsInitialized() && |
94 user_manager::UserManager::Get()->IsUserLoggedIn(); | 95 user_manager::UserManager::Get()->IsUserLoggedIn(); |
95 } | 96 } |
96 #endif // defined(OS_CHROMEOS) | 97 #endif // defined(OS_CHROMEOS) |
97 | 98 |
98 } // namespace | 99 } // namespace |
99 | 100 |
100 ComponentLoader::ComponentExtensionInfo::ComponentExtensionInfo( | 101 ComponentLoader::ComponentExtensionInfo::ComponentExtensionInfo( |
101 const base::DictionaryValue* manifest, const base::FilePath& directory) | 102 const base::DictionaryValue* manifest, const base::FilePath& directory) |
102 : manifest(manifest), | 103 : manifest(manifest), |
103 root_directory(directory) { | 104 root_directory(directory) { |
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 off_the_record_context, Extension::GetBaseURLFromExtensionId(id)); | 660 off_the_record_context, Extension::GetBaseURLFromExtensionId(id)); |
660 storage::FileSystemContext* file_system_context = | 661 storage::FileSystemContext* file_system_context = |
661 content::BrowserContext::GetStoragePartitionForSite( | 662 content::BrowserContext::GetStoragePartitionForSite( |
662 off_the_record_context, site)->GetFileSystemContext(); | 663 off_the_record_context, site)->GetFileSystemContext(); |
663 file_system_context->EnableTemporaryFileSystemInIncognito(); | 664 file_system_context->EnableTemporaryFileSystemInIncognito(); |
664 } | 665 } |
665 #endif | 666 #endif |
666 } | 667 } |
667 | 668 |
668 } // namespace extensions | 669 } // namespace extensions |
OLD | NEW |