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

Side by Side Diff: chrome/browser/extensions/api/streams_private/streams_private_api.cc

Issue 12381035: Move Mime type handling to streamsPrivate API, so that it works on Desktop Chrome. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Initialize test variable Created 7 years, 9 months 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 (c) 2012 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/api/streams_private/streams_private_api.h"
6
7 #include "base/json/json_writer.h"
8 #include "base/lazy_instance.h"
9 #include "base/stl_util.h"
10 #include "base/strings/string_number_conversions.h"
11 #include "base/values.h"
12 #include "chrome/browser/extensions/event_router.h"
13 #include "chrome/browser/extensions/extension_function_registry.h"
14 #include "chrome/browser/extensions/extension_input_module_constants.h"
15 #include "chrome/browser/extensions/extension_system.h"
16 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/common/extensions/mime_types_handler.h"
18
19 namespace keys = extension_input_module_constants;
20
21 namespace events {
22
23 const char kOnExecuteMimeTypeHandler[] =
24 "streamsPrivate.onExecuteMimeTypeHandler";
25
26 } // namespace events
27
28 namespace extensions {
29
30 StreamsPrivateAPI::StreamsPrivateAPI(Profile* profile)
31 : profile_(profile) {
32 (new MimeTypesHandlerParser)->Register();
33 }
34
35 StreamsPrivateAPI::~StreamsPrivateAPI() {
36 }
37
38 static base::LazyInstance<ProfileKeyedAPIFactory<StreamsPrivateAPI> >
39 g_factory = LAZY_INSTANCE_INITIALIZER;
40
41 // static
42 ProfileKeyedAPIFactory<StreamsPrivateAPI>*
43 StreamsPrivateAPI::GetFactoryInstance() {
44 return &g_factory.Get();
45 }
46
47 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698