| 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/extension_prefs.h" | 5 #include "chrome/browser/extensions/extension_prefs.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/prefs/pref_notifier.h" | 8 #include "base/prefs/pref_notifier.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 // Retrieve the explicit host permissions. | 551 // Retrieve the explicit host permissions. |
| 552 URLPatternSet explicit_hosts; | 552 URLPatternSet explicit_hosts; |
| 553 ReadExtensionPrefURLPatternSet( | 553 ReadExtensionPrefURLPatternSet( |
| 554 extension_id, JoinPrefs(pref_key, kPrefExplicitHosts), | 554 extension_id, JoinPrefs(pref_key, kPrefExplicitHosts), |
| 555 &explicit_hosts, Extension::kValidHostPermissionSchemes); | 555 &explicit_hosts, Extension::kValidHostPermissionSchemes); |
| 556 | 556 |
| 557 // Retrieve the scriptable host permissions. | 557 // Retrieve the scriptable host permissions. |
| 558 URLPatternSet scriptable_hosts; | 558 URLPatternSet scriptable_hosts; |
| 559 ReadExtensionPrefURLPatternSet( | 559 ReadExtensionPrefURLPatternSet( |
| 560 extension_id, JoinPrefs(pref_key, kPrefScriptableHosts), | 560 extension_id, JoinPrefs(pref_key, kPrefScriptableHosts), |
| 561 &scriptable_hosts, UserScript::kValidUserScriptSchemes); | 561 &scriptable_hosts, UserScript::ValidUserScriptSchemes()); |
| 562 | 562 |
| 563 return new PermissionSet(apis, explicit_hosts, scriptable_hosts); | 563 return new PermissionSet(apis, explicit_hosts, scriptable_hosts); |
| 564 } | 564 } |
| 565 | 565 |
| 566 void ExtensionPrefs::SetExtensionPrefPermissionSet( | 566 void ExtensionPrefs::SetExtensionPrefPermissionSet( |
| 567 const std::string& extension_id, | 567 const std::string& extension_id, |
| 568 const std::string& pref_key, | 568 const std::string& pref_key, |
| 569 const PermissionSet* new_value) { | 569 const PermissionSet* new_value) { |
| 570 // Set the API permissions. | 570 // Set the API permissions. |
| 571 // The format of api_values is: | 571 // The format of api_values is: |
| (...skipping 1824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2396 is_enabled = initial_state == Extension::ENABLED; | 2396 is_enabled = initial_state == Extension::ENABLED; |
| 2397 } | 2397 } |
| 2398 | 2398 |
| 2399 extension_pref_value_map_->RegisterExtension(extension_id, install_time, | 2399 extension_pref_value_map_->RegisterExtension(extension_id, install_time, |
| 2400 is_enabled); | 2400 is_enabled); |
| 2401 content_settings_store_->RegisterExtension(extension_id, install_time, | 2401 content_settings_store_->RegisterExtension(extension_id, install_time, |
| 2402 is_enabled); | 2402 is_enabled); |
| 2403 } | 2403 } |
| 2404 | 2404 |
| 2405 } // namespace extensions | 2405 } // namespace extensions |
| OLD | NEW |