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

Side by Side Diff: content/public/browser/background_tracing_config.h

Issue 1874903002: Convert //content from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix indent Created 4 years, 8 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_CONFIG_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_CONFIG_H_
6 #define CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_CONFIG_H_ 6 #define CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_CONFIG_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include <memory>
9
9 #include "base/trace_event/trace_event_impl.h" 10 #include "base/trace_event/trace_event_impl.h"
10 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
11 12
12 namespace base { 13 namespace base {
13 class DictionaryValue; 14 class DictionaryValue;
14 } 15 }
15 16
16 namespace content { 17 namespace content {
17 18
18 // BackgroundTracingConfig is passed to the BackgroundTracingManager to 19 // BackgroundTracingConfig is passed to the BackgroundTracingManager to
19 // setup the trigger rules used to enable/disable background tracing. 20 // setup the trigger rules used to enable/disable background tracing.
20 class CONTENT_EXPORT BackgroundTracingConfig { 21 class CONTENT_EXPORT BackgroundTracingConfig {
21 public: 22 public:
22 virtual ~BackgroundTracingConfig(); 23 virtual ~BackgroundTracingConfig();
23 24
24 enum TracingMode { 25 enum TracingMode {
25 PREEMPTIVE, 26 PREEMPTIVE,
26 REACTIVE, 27 REACTIVE,
27 }; 28 };
28 TracingMode tracing_mode() const { return tracing_mode_; } 29 TracingMode tracing_mode() const { return tracing_mode_; }
29 30
30 static scoped_ptr<BackgroundTracingConfig> FromDict( 31 static std::unique_ptr<BackgroundTracingConfig> FromDict(
31 const base::DictionaryValue* dict); 32 const base::DictionaryValue* dict);
32 33
33 virtual void IntoDict(base::DictionaryValue* dict) const = 0; 34 virtual void IntoDict(base::DictionaryValue* dict) const = 0;
34 35
35 private: 36 private:
36 friend class BackgroundTracingConfigImpl; 37 friend class BackgroundTracingConfigImpl;
37 explicit BackgroundTracingConfig(TracingMode tracing_mode); 38 explicit BackgroundTracingConfig(TracingMode tracing_mode);
38 39
39 const TracingMode tracing_mode_; 40 const TracingMode tracing_mode_;
40 }; 41 };
41 42
42 } // namespace content 43 } // namespace content
43 44
44 #endif // CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_CONFIG_H_ 45 #endif // CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_CONFIG_H_
OLDNEW
« no previous file with comments | « content/public/browser/appcache_service.h ('k') | content/public/browser/background_tracing_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698