Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Side by Side Diff: chrome/browser/extensions/declarative_user_script_manager.cc

Issue 796453003: Introduce DeclarativeUserScriptManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move back to extensions namespace. Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #include "chrome/browser/extensions/declarative_user_script_manager.h"
6
7 #include "chrome/browser/extensions/declarative_user_script_master.h"
8
9 namespace extensions {
10
11 DeclarativeUserScriptManager::DeclarativeUserScriptManager(Profile* profile)
12 : profile_(profile) {
13 }
14
15 DeclarativeUserScriptManager::~DeclarativeUserScriptManager() {
16 }
17
18 DeclarativeUserScriptMaster*
19 DeclarativeUserScriptManager::GetDeclarativeUserScriptMasterByID(
20 const std::string& id) {
21 UserScriptMasterMap::iterator it = declarative_user_script_masters_.find(id);
22
23 if (it != declarative_user_script_masters_.end())
24 return it->second.get();
25
26 linked_ptr<DeclarativeUserScriptMaster> master(
27 new DeclarativeUserScriptMaster(profile_, id));
28 declarative_user_script_masters_[id] = master;
29 return master.get();
30 }
31
32 } // extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698