base::Time multiplicative operator overloading
[chromium-blink-merge.git] / chrome / browser / extensions / declarative_user_script_master.cc
blob40fc511dd964ec23196d31fd6677979381963d22
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/extensions/declarative_user_script_master.h"
7 #include <set>
9 #include "chrome/browser/profiles/profile.h"
11 namespace extensions {
13 DeclarativeUserScriptMaster::DeclarativeUserScriptMaster(Profile* profile,
14 const HostID& host_id)
15 : host_id_(host_id),
16 loader_(profile,
17 host_id,
18 false /* listen_for_extension_system_loaded */) {
21 DeclarativeUserScriptMaster::~DeclarativeUserScriptMaster() {
24 void DeclarativeUserScriptMaster::AddScript(const UserScript& script) {
25 std::set<UserScript> set;
26 set.insert(script);
27 loader_.AddScripts(set);
30 void DeclarativeUserScriptMaster::RemoveScript(const UserScript& script) {
31 std::set<UserScript> set;
32 set.insert(script);
33 loader_.RemoveScripts(set);
36 void DeclarativeUserScriptMaster::ClearScripts() {
37 loader_.ClearScripts();
40 } // namespace extensions