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

Side by Side Diff: content/public/common/resource_devtools_info.h

Issue 1004593005: base::RefCounted now DCHECKs when referenced from multiple threads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix lots of tests using UnsafeRefCounted. Created 5 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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_COMMON_RESOURCE_DEVTOOLS_INFO_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_RESOURCE_DEVTOOLS_INFO_H_
6 #define CONTENT_PUBLIC_COMMON_RESOURCE_DEVTOOLS_INFO_H_ 6 #define CONTENT_PUBLIC_COMMON_RESOURCE_DEVTOOLS_INFO_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/strings/string_split.h" 13 #include "base/strings/string_split.h"
14 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
15 15
16 namespace content { 16 namespace content {
17 17
18 // Note: when modifying this structure, also update DeepCopy in 18 // Note: when modifying this structure, also update DeepCopy in
19 // resource_devtools_info.cc. 19 // resource_devtools_info.cc.
20 struct ResourceDevToolsInfo : base::RefCounted<ResourceDevToolsInfo> { 20 // TODO(mgiuca): Avoid using UnsafeRefCounted. http://crbug.com/469952.
21 struct ResourceDevToolsInfo : base::UnsafeRefCounted<ResourceDevToolsInfo> {
21 typedef base::StringPairs HeadersVector; 22 typedef base::StringPairs HeadersVector;
22 23
23 CONTENT_EXPORT ResourceDevToolsInfo(); 24 CONTENT_EXPORT ResourceDevToolsInfo();
24 25
25 scoped_refptr<ResourceDevToolsInfo> DeepCopy() const; 26 scoped_refptr<ResourceDevToolsInfo> DeepCopy() const;
26 27
27 int32 http_status_code; 28 int32 http_status_code;
28 std::string http_status_text; 29 std::string http_status_text;
29 HeadersVector request_headers; 30 HeadersVector request_headers;
30 HeadersVector response_headers; 31 HeadersVector response_headers;
31 std::string request_headers_text; 32 std::string request_headers_text;
32 std::string response_headers_text; 33 std::string response_headers_text;
33 34
34 private: 35 private:
35 friend class base::RefCounted<ResourceDevToolsInfo>; 36 friend class base::UnsafeRefCounted<ResourceDevToolsInfo>;
36 CONTENT_EXPORT ~ResourceDevToolsInfo(); 37 CONTENT_EXPORT ~ResourceDevToolsInfo();
37 }; 38 };
38 39
39 } // namespace content 40 } // namespace content
40 41
41 #endif // CONTENT_PUBLIC_COMMON_RESOURCE_DEVTOOLS_INFO_H_ 42 #endif // CONTENT_PUBLIC_COMMON_RESOURCE_DEVTOOLS_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698