| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/extensions/extension_util.h" | 5 #include "chrome/browser/extensions/extension_util.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 | 269 |
| 270 bool IsAppLaunchableWithoutEnabling(const std::string& extension_id, | 270 bool IsAppLaunchableWithoutEnabling(const std::string& extension_id, |
| 271 content::BrowserContext* context) { | 271 content::BrowserContext* context) { |
| 272 return ExtensionRegistry::Get(context)->GetExtensionById( | 272 return ExtensionRegistry::Get(context)->GetExtensionById( |
| 273 extension_id, ExtensionRegistry::ENABLED) != NULL; | 273 extension_id, ExtensionRegistry::ENABLED) != NULL; |
| 274 } | 274 } |
| 275 | 275 |
| 276 bool ShouldSync(const Extension* extension, | 276 bool ShouldSync(const Extension* extension, |
| 277 content::BrowserContext* context) { | 277 content::BrowserContext* context) { |
| 278 return sync_helper::IsSyncable(extension) && | 278 return sync_helper::IsSyncable(extension) && |
| 279 !util::IsEphemeralApp(extension->id(), context) && | |
| 280 !ExtensionPrefs::Get(context)->DoNotSync(extension->id()); | 279 !ExtensionPrefs::Get(context)->DoNotSync(extension->id()); |
| 281 } | 280 } |
| 282 | 281 |
| 283 bool IsExtensionIdle(const std::string& extension_id, | 282 bool IsExtensionIdle(const std::string& extension_id, |
| 284 content::BrowserContext* context) { | 283 content::BrowserContext* context) { |
| 285 std::vector<std::string> ids_to_check; | 284 std::vector<std::string> ids_to_check; |
| 286 ids_to_check.push_back(extension_id); | 285 ids_to_check.push_back(extension_id); |
| 287 | 286 |
| 288 const Extension* extension = | 287 const Extension* extension = |
| 289 ExtensionRegistry::Get(context) | 288 ExtensionRegistry::Get(context) |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 base::FieldTrialList::FindFullName( | 382 base::FieldTrialList::FindFullName( |
| 384 kSupervisedUserExtensionPermissionIncreaseFieldTrialName); | 383 kSupervisedUserExtensionPermissionIncreaseFieldTrialName); |
| 385 std::string value = variations::GetVariationParamValue( | 384 std::string value = variations::GetVariationParamValue( |
| 386 kSupervisedUserExtensionPermissionIncreaseFieldTrialName, | 385 kSupervisedUserExtensionPermissionIncreaseFieldTrialName, |
| 387 profile->IsChild() ? "child_account" : "legacy_supervised_user"); | 386 profile->IsChild() ? "child_account" : "legacy_supervised_user"); |
| 388 return value == "true"; | 387 return value == "true"; |
| 389 } | 388 } |
| 390 | 389 |
| 391 } // namespace util | 390 } // namespace util |
| 392 } // namespace extensions | 391 } // namespace extensions |
| OLD | NEW |