| Index: chrome/browser/extensions/user_script_master_manager.cc
|
| diff --git a/chrome/browser/extensions/user_script_master_manager.cc b/chrome/browser/extensions/user_script_master_manager.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e0c392cc65c4f569c5f7b2412fb4a1a0fbbe2b01
|
| --- /dev/null
|
| +++ b/chrome/browser/extensions/user_script_master_manager.cc
|
| @@ -0,0 +1,37 @@
|
| +// Copyright (c) 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "chrome/browser/extensions/user_script_master_manager.h"
|
| +
|
| +#include "chrome/browser/extensions/shared_user_script_master.h"
|
| +#include "chrome/browser/profiles/profile.h"
|
| +
|
| +namespace extensions {
|
| +
|
| +UserScriptMasterManager::UserScriptMasterManager(Profile* profile)
|
| + : profile_(profile),
|
| + shared_master_(new SharedUserScriptMaster(profile)),
|
| + extension_registry_observer_(this) {
|
| + extension_registry_observer_.Add(ExtensionRegistry::Get(profile));
|
| +}
|
| +
|
| +UserScriptMasterManager::~UserScriptMasterManager() {
|
| +}
|
| +
|
| +void UserScriptMasterManager::OnExtensionLoaded(
|
| + content::BrowserContext* browser_context,
|
| + const Extension* extension) {
|
| +}
|
| +
|
| +void UserScriptMasterManager::OnExtensionUnloaded(
|
| + content::BrowserContext* browser_context,
|
| + const Extension* extension,
|
| + UnloadedExtensionInfo::Reason reason) {
|
| + const ExtensionId& id = extension->id();
|
| + if (declarative_masters_.find(id) != declarative_masters_.end()) {
|
| + declarative_masters_.get(id)->ClearScripts();
|
| + }
|
| +}
|
| +
|
| +} // namespace extensions
|
|
|