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 <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
461 // Load ChromeVox extension now if spoken feedback is enabled. | 461 // Load ChromeVox extension now if spoken feedback is enabled. |
462 if (chromeos::AccessibilityManager::Get() && | 462 if (chromeos::AccessibilityManager::Get() && |
463 chromeos::AccessibilityManager::Get()->IsSpokenFeedbackEnabled()) { | 463 chromeos::AccessibilityManager::Get()->IsSpokenFeedbackEnabled()) { |
464 base::FilePath path = | 464 base::FilePath path = |
465 base::FilePath(extension_misc::kChromeVoxExtensionPath); | 465 base::FilePath(extension_misc::kChromeVoxExtensionPath); |
466 Add(IDR_CHROMEVOX_MANIFEST, path); | 466 Add(IDR_CHROMEVOX_MANIFEST, path); |
467 } | 467 } |
468 #endif // defined(OS_CHROMEOS) | 468 #endif // defined(OS_CHROMEOS) |
469 | 469 |
470 #if defined(ENABLE_GOOGLE_NOW) | 470 #if defined(ENABLE_GOOGLE_NOW) |
471 if (base::FieldTrialList::FindFullName("GoogleNow") == "Enable" || | 471 std::string fieldTrialResult = |
472 base::FieldTrialList::FindFullName("GoogleNow"); | |
473 if ((fieldTrialResult == "Enable") || | |
474 (fieldTrialResult == "EnabledViaFlag") || | |
vadimt
2013/08/03 02:07:53
There will be a group 'EnableWithBackground'. I'd
robliao
2013/08/09 21:46:44
Done.
| |
472 CommandLine::ForCurrentProcess()->HasSwitch( | 475 CommandLine::ForCurrentProcess()->HasSwitch( |
473 switches::kEnableGoogleNowIntegration)) { | 476 switches::kEnableGoogleNowIntegration)) { |
474 Add(IDR_GOOGLE_NOW_MANIFEST, | 477 Add(IDR_GOOGLE_NOW_MANIFEST, |
475 base::FilePath(FILE_PATH_LITERAL("google_now"))); | 478 base::FilePath(FILE_PATH_LITERAL("google_now"))); |
476 } | 479 } |
477 #endif | 480 #endif |
478 } | 481 } |
479 | 482 |
480 void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) { | 483 void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) { |
481 delete component->manifest; | 484 delete component->manifest; |
482 if (extension_service_->is_ready()) { | 485 if (extension_service_->is_ready()) { |
483 extension_service_-> | 486 extension_service_-> |
484 UnloadExtension(component->extension_id, | 487 UnloadExtension(component->extension_id, |
485 extension_misc::UNLOAD_REASON_DISABLE); | 488 extension_misc::UNLOAD_REASON_DISABLE); |
486 } | 489 } |
487 } | 490 } |
488 | 491 |
489 } // namespace extensions | 492 } // namespace extensions |
OLD | NEW |