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

Side by Side Diff: mojo/application_manager/background_shell_application_loader.cc

Issue 502573006: Remove implicit conversions from scoped_refptr to T* in mojo/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | mojo/dbus/dbus_external_service.cc » ('j') | mojo/system/channel.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "mojo/application_manager/background_shell_application_loader.h" 5 #include "mojo/application_manager/background_shell_application_loader.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "mojo/application_manager/application_manager.h" 9 #include "mojo/application_manager/application_manager.h"
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 if (!thread_) { 60 if (!thread_) {
61 // TODO(tim): It'd be nice if we could just have each Load call 61 // TODO(tim): It'd be nice if we could just have each Load call
62 // result in a new thread like DynamicService{Loader, Runner}. But some 62 // result in a new thread like DynamicService{Loader, Runner}. But some
63 // loaders are creating multiple ApplicationImpls (NetworkApplicationLoader) 63 // loaders are creating multiple ApplicationImpls (NetworkApplicationLoader)
64 // sharing a delegate (etc). So we have to keep it single threaded, wait 64 // sharing a delegate (etc). So we have to keep it single threaded, wait
65 // for the thread to initialize, and post to the TaskRunner for subsequent 65 // for the thread to initialize, and post to the TaskRunner for subsequent
66 // Load calls for now. 66 // Load calls for now.
67 thread_.reset(new base::DelegateSimpleThread(this, thread_name_)); 67 thread_.reset(new base::DelegateSimpleThread(this, thread_name_));
68 thread_->Start(); 68 thread_->Start();
69 message_loop_created_.Wait(); 69 message_loop_created_.Wait();
70 DCHECK(task_runner_); 70 DCHECK(task_runner_.get());
71 } 71 }
72 72
73 task_runner_->PostTask( 73 task_runner_->PostTask(
74 FROM_HERE, 74 FROM_HERE,
75 base::Bind( 75 base::Bind(
76 &BackgroundShellApplicationLoader::LoadOnBackgroundThread, 76 &BackgroundShellApplicationLoader::LoadOnBackgroundThread,
77 base::Unretained(this), 77 base::Unretained(this),
78 manager, 78 manager,
79 url, 79 url,
80 base::Owned(new ScopedMessagePipeHandle(shell_handle.Pass())))); 80 base::Owned(new ScopedMessagePipeHandle(shell_handle.Pass()))));
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 void BackgroundShellApplicationLoader::OnServiceErrorOnBackgroundThread( 119 void BackgroundShellApplicationLoader::OnServiceErrorOnBackgroundThread(
120 ApplicationManager* manager, 120 ApplicationManager* manager,
121 const GURL& url) { 121 const GURL& url) {
122 DCHECK(task_runner_->RunsTasksOnCurrentThread()); 122 DCHECK(task_runner_->RunsTasksOnCurrentThread());
123 if (!background_loader_) 123 if (!background_loader_)
124 background_loader_ = new BackgroundLoader(loader_.get()); 124 background_loader_ = new BackgroundLoader(loader_.get());
125 background_loader_->OnServiceError(manager, url); 125 background_loader_->OnServiceError(manager, url);
126 } 126 }
127 127
128 } // namespace mojo 128 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | mojo/dbus/dbus_external_service.cc » ('j') | mojo/system/channel.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698