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: content/browser/renderer_host/pepper/pepper_lookup_request.h

Issue 1062413002: Remove unnecessary instrumentation for several jank bugs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile fixes Created 5 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 (c) 2012 The Chromium Authors. All rights reserved. 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 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_BROWSER_RENDERER_HOST_PEPPER_PEPPER_LOOKUP_REQUEST_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_LOOKUP_REQUEST_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_LOOKUP_REQUEST_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_LOOKUP_REQUEST_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/profiler/scoped_tracker.h"
11 #include "net/base/address_list.h" 10 #include "net/base/address_list.h"
12 #include "net/base/net_errors.h" 11 #include "net/base/net_errors.h"
13 #include "net/dns/host_resolver.h" 12 #include "net/dns/host_resolver.h"
14 #include "net/dns/single_request_host_resolver.h" 13 #include "net/dns/single_request_host_resolver.h"
15 14
16 namespace content { 15 namespace content {
17 16
18 template <class T> 17 template <class T>
19 class PepperLookupRequest { 18 class PepperLookupRequest {
20 public: 19 public:
(...skipping 20 matching lines...) Expand all
41 &addresses_, 40 &addresses_,
42 base::Bind(&PepperLookupRequest<T>::OnLookupFinished, 41 base::Bind(&PepperLookupRequest<T>::OnLookupFinished,
43 base::Unretained(this)), 42 base::Unretained(this)),
44 net::BoundNetLog()); 43 net::BoundNetLog());
45 if (result != net::ERR_IO_PENDING) 44 if (result != net::ERR_IO_PENDING)
46 OnLookupFinished(result); 45 OnLookupFinished(result);
47 } 46 }
48 47
49 private: 48 private:
50 void OnLookupFinished(int result) { 49 void OnLookupFinished(int result) {
51 // TODO(vadimt): Remove ScopedTracker below once crbug.com/436634 is fixed.
52 tracked_objects::ScopedTracker tracking_profile(
53 FROM_HERE_WITH_EXPLICIT_FUNCTION(
54 "436634 PepperLookupRequest::OnLookupFinished"));
55
56 callback_.Run(result, addresses_, *bound_info_); 50 callback_.Run(result, addresses_, *bound_info_);
57 delete this; 51 delete this;
58 } 52 }
59 53
60 net::SingleRequestHostResolver resolver_; 54 net::SingleRequestHostResolver resolver_;
61 net::HostResolver::RequestInfo request_info_; 55 net::HostResolver::RequestInfo request_info_;
62 net::RequestPriority priority_; 56 net::RequestPriority priority_;
63 scoped_ptr<T> bound_info_; 57 scoped_ptr<T> bound_info_;
64 LookupRequestCallback callback_; 58 LookupRequestCallback callback_;
65 59
66 net::AddressList addresses_; 60 net::AddressList addresses_;
67 61
68 DISALLOW_COPY_AND_ASSIGN(PepperLookupRequest); 62 DISALLOW_COPY_AND_ASSIGN(PepperLookupRequest);
69 }; 63 };
70 64
71 } // namespace content 65 } // namespace content
72 66
73 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_LOOKUP_REQUEST_H_ 67 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_LOOKUP_REQUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698