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

Side by Side Diff: storage/browser/blob/view_blob_internals_job.cc

Issue 686963002: Switching profiler instrumentations from ScopedProfile to ScopedTracker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 #include "storage/browser/blob/view_blob_internals_job.h" 5 #include "storage/browser/blob/view_blob_internals_job.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/i18n/number_formatting.h" 10 #include "base/i18n/number_formatting.h"
11 #include "base/i18n/time_formatting.h" 11 #include "base/i18n/time_formatting.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/message_loop/message_loop.h" 13 #include "base/message_loop/message_loop.h"
14 #include "base/profiler/scoped_profile.h" 14 #include "base/profiler/scoped_tracker.h"
15 #include "base/strings/string_number_conversions.h" 15 #include "base/strings/string_number_conversions.h"
16 #include "base/strings/string_util.h" 16 #include "base/strings/string_util.h"
17 #include "base/strings/stringprintf.h" 17 #include "base/strings/stringprintf.h"
18 #include "base/strings/utf_string_conversions.h" 18 #include "base/strings/utf_string_conversions.h"
19 #include "net/base/escape.h" 19 #include "net/base/escape.h"
20 #include "net/base/net_errors.h" 20 #include "net/base/net_errors.h"
21 #include "net/url_request/url_request.h" 21 #include "net/url_request/url_request.h"
22 #include "storage/browser/blob/blob_storage_context.h" 22 #include "storage/browser/blob/blob_storage_context.h"
23 #include "storage/common/blob/blob_data.h" 23 #include "storage/common/blob/blob_data.h"
24 24
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 void ViewBlobInternalsJob::Kill() { 125 void ViewBlobInternalsJob::Kill() {
126 net::URLRequestSimpleJob::Kill(); 126 net::URLRequestSimpleJob::Kill();
127 weak_factory_.InvalidateWeakPtrs(); 127 weak_factory_.InvalidateWeakPtrs();
128 } 128 }
129 129
130 int ViewBlobInternalsJob::GetData( 130 int ViewBlobInternalsJob::GetData(
131 std::string* mime_type, 131 std::string* mime_type,
132 std::string* charset, 132 std::string* charset,
133 std::string* data, 133 std::string* data,
134 const net::CompletionCallback& callback) const { 134 const net::CompletionCallback& callback) const {
135 // TODO(vadimt): Remove ScopedProfile below once crbug.com/422489 is fixed. 135 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422489 is fixed.
136 tracked_objects::ScopedProfile tracking_profile( 136 tracked_objects::ScopedTracker tracking_profile(
137 FROM_HERE_WITH_EXPLICIT_FUNCTION("422489 ViewBlobInternalsJob::GetData")); 137 FROM_HERE_WITH_EXPLICIT_FUNCTION("422489 ViewBlobInternalsJob::GetData"));
138 138
139 mime_type->assign("text/html"); 139 mime_type->assign("text/html");
140 charset->assign("UTF-8"); 140 charset->assign("UTF-8");
141 141
142 data->clear(); 142 data->clear();
143 StartHTML(data); 143 StartHTML(data);
144 if (blob_storage_context_->blob_map_.empty()) 144 if (blob_storage_context_->blob_map_.empty())
145 data->append(kEmptyBlobStorageMessage); 145 data->append(kEmptyBlobStorageMessage);
146 else 146 else
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 } 238 }
239 239
240 if (has_multi_items) 240 if (has_multi_items)
241 EndHTMLList(out); 241 EndHTMLList(out);
242 } 242 }
243 243
244 EndHTMLList(out); 244 EndHTMLList(out);
245 } 245 }
246 246
247 } // namespace storage 247 } // namespace storage
OLDNEW
« no previous file with comments | « storage/browser/blob/local_file_stream_reader.cc ('k') | storage/browser/fileapi/local_file_stream_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698