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

Side by Side Diff: components/cronet/ios/cronet_environment.mm

Issue 2836293006: Remove TaskScheduler::CreateAndSetSimpleTaskScheduler(). (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
« no previous file with comments | « base/task_scheduler/task_scheduler.cc ('k') | content/child/child_process.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "components/cronet/ios/cronet_environment.h" 5 #include "components/cronet/ios/cronet_environment.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/atomicops.h" 10 #include "base/atomicops.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 return main_context_getter_.get(); 111 return main_context_getter_.get();
112 } 112 }
113 113
114 // static 114 // static
115 void CronetEnvironment::Initialize() { 115 void CronetEnvironment::Initialize() {
116 // DCHECK_EQ([NSThread currentThread], [NSThread mainThread]); 116 // DCHECK_EQ([NSThread currentThread], [NSThread mainThread]);
117 // This method must be called once from the main thread. 117 // This method must be called once from the main thread.
118 if (!g_at_exit_) 118 if (!g_at_exit_)
119 g_at_exit_ = new base::AtExitManager; 119 g_at_exit_ = new base::AtExitManager;
120 120
121 base::TaskScheduler::CreateAndSetSimpleTaskScheduler("CronetIos"); 121 base::TaskScheduler::CreateAndStartWithDefaultParams("CronetIos");
122 122
123 url::Initialize(); 123 url::Initialize();
124 base::CommandLine::Init(0, nullptr); 124 base::CommandLine::Init(0, nullptr);
125 125
126 // Without doing this, StatisticsRecorder::FactoryGet() leaks one histogram 126 // Without doing this, StatisticsRecorder::FactoryGet() leaks one histogram
127 // per call after the first for a given name. 127 // per call after the first for a given name.
128 base::StatisticsRecorder::Initialize(); 128 base::StatisticsRecorder::Initialize();
129 129
130 // Create a message loop on the UI thread. 130 // Create a message loop on the UI thread.
131 DCHECK(!base::MessageLoop::current()); 131 DCHECK(!base::MessageLoop::current());
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 event->Signal(); 371 event->Signal();
372 } 372 }
373 373
374 std::string CronetEnvironment::getDefaultQuicUserAgentId() const { 374 std::string CronetEnvironment::getDefaultQuicUserAgentId() const {
375 return base::SysNSStringToUTF8([[NSBundle mainBundle] 375 return base::SysNSStringToUTF8([[NSBundle mainBundle]
376 objectForInfoDictionaryKey:@"CFBundleDisplayName"]) + 376 objectForInfoDictionaryKey:@"CFBundleDisplayName"]) +
377 " Cronet/" + CRONET_VERSION; 377 " Cronet/" + CRONET_VERSION;
378 } 378 }
379 379
380 } // namespace cronet 380 } // namespace cronet
OLDNEW
« no previous file with comments | « base/task_scheduler/task_scheduler.cc ('k') | content/child/child_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698