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

Side by Side Diff: chrome/browser/extensions/api/feedback_private/single_log_source_factory.cc

Issue 2840103002: Add new API function: feedbackPrivate.readLogSource (Closed)
Patch Set: Add comments to SingleLogSourceFactory; Add new histogram enum Created 3 years, 7 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 2017 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/feedback_private/single_log_source_facto ry.h"
6
7 namespace extensions {
8
9 namespace {
10
11 const SingleLogSourceFactory::CreateCallback* g_callback = nullptr;
12
13 } // namespace
14
15 // static
16 system_logs::SingleLogSource* SingleLogSourceFactory::CreateSingleLogSource(
17 system_logs::SingleLogSource::SupportedSource type) {
18 if (g_callback)
19 return g_callback->Run(type);
20
21 return new system_logs::SingleLogSource(type);
22 }
23
24 // static
25 void SingleLogSourceFactory::InitForTesting(
26 const SingleLogSourceFactory::CreateCallback* callback) {
27 g_callback = callback;
28 }
29
30 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698