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

Side by Side Diff: content/browser/webui/url_data_manager_backend.cc

Issue 2857983003: Use constexpr TaskTraits constructor in content. (Closed)
Patch Set: 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
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 "content/browser/webui/url_data_manager_backend.h" 5 #include "content/browser/webui/url_data_manager_backend.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 CHECK(buf->data()); 467 CHECK(buf->data());
468 468
469 int remaining = data_->size() - data_offset_; 469 int remaining = data_->size() - data_offset_;
470 if (buf_size > remaining) 470 if (buf_size > remaining)
471 buf_size = remaining; 471 buf_size = remaining;
472 472
473 if (buf_size == 0) 473 if (buf_size == 0)
474 return 0; 474 return 0;
475 475
476 base::PostTaskWithTraitsAndReply( 476 base::PostTaskWithTraitsAndReply(
477 FROM_HERE, base::TaskTraits().WithShutdownBehavior( 477 FROM_HERE, {base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN},
478 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN),
479 base::Bind(&CopyData, base::RetainedRef(buf), buf_size, data_, 478 base::Bind(&CopyData, base::RetainedRef(buf), buf_size, data_,
480 data_offset_), 479 data_offset_),
481 base::Bind(&URLRequestChromeJob::ReadRawDataComplete, AsWeakPtr(), 480 base::Bind(&URLRequestChromeJob::ReadRawDataComplete, AsWeakPtr(),
482 buf_size)); 481 buf_size));
483 data_offset_ += buf_size; 482 data_offset_ += buf_size;
484 483
485 return net::ERR_IO_PENDING; 484 return net::ERR_IO_PENDING;
486 } 485 }
487 486
488 void URLRequestChromeJob::DelayStartForDevTools( 487 void URLRequestChromeJob::DelayStartForDevTools(
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 849
851 } // namespace 850 } // namespace
852 851
853 net::URLRequestJobFactory::ProtocolHandler* CreateDevToolsProtocolHandler( 852 net::URLRequestJobFactory::ProtocolHandler* CreateDevToolsProtocolHandler(
854 ResourceContext* resource_context, 853 ResourceContext* resource_context,
855 bool is_incognito) { 854 bool is_incognito) {
856 return new DevToolsJobFactory(resource_context, is_incognito); 855 return new DevToolsJobFactory(resource_context, is_incognito);
857 } 856 }
858 857
859 } // namespace content 858 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698