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

Side by Side Diff: chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc

Issue 2110603002: Remove calls to MessageLoop::current() in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 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 "chrome/browser/chromeos/login/users/chrome_user_manager_impl.h" 5 #include "chrome/browser/chromeos/login/users/chrome_user_manager_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cstddef> 9 #include <cstddef>
10 #include <set> 10 #include <set>
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 chrome::NOTIFICATION_OWNERSHIP_STATUS_CHANGED, 182 chrome::NOTIFICATION_OWNERSHIP_STATUS_CHANGED,
183 content::NotificationService::AllSources()); 183 content::NotificationService::AllSources());
184 registrar_.Add(this, 184 registrar_.Add(this,
185 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, 185 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED,
186 content::NotificationService::AllSources()); 186 content::NotificationService::AllSources());
187 registrar_.Add(this, 187 registrar_.Add(this,
188 chrome::NOTIFICATION_PROFILE_CREATED, 188 chrome::NOTIFICATION_PROFILE_CREATED,
189 content::NotificationService::AllSources()); 189 content::NotificationService::AllSources());
190 190
191 // Since we're in ctor postpone any actions till this is fully created. 191 // Since we're in ctor postpone any actions till this is fully created.
192 if (base::MessageLoop::current()) { 192 if (base::ThreadTaskRunnerHandle::IsSet()) {
193 base::ThreadTaskRunnerHandle::Get()->PostTask( 193 base::ThreadTaskRunnerHandle::Get()->PostTask(
194 FROM_HERE, 194 FROM_HERE,
195 base::Bind(&ChromeUserManagerImpl::RetrieveTrustedDevicePolicies, 195 base::Bind(&ChromeUserManagerImpl::RetrieveTrustedDevicePolicies,
196 weak_factory_.GetWeakPtr())); 196 weak_factory_.GetWeakPtr()));
197 } 197 }
198 198
199 local_accounts_subscription_ = cros_settings_->AddSettingsObserver( 199 local_accounts_subscription_ = cros_settings_->AddSettingsObserver(
200 kAccountsPrefDeviceLocalAccounts, 200 kAccountsPrefDeviceLocalAccounts,
201 base::Bind(&ChromeUserManagerImpl::RetrieveTrustedDevicePolicies, 201 base::Bind(&ChromeUserManagerImpl::RetrieveTrustedDevicePolicies,
202 weak_factory_.GetWeakPtr())); 202 weak_factory_.GetWeakPtr()));
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1323 break; 1323 break;
1324 default: 1324 default:
1325 NOTREACHED(); 1325 NOTREACHED();
1326 break; 1326 break;
1327 } 1327 }
1328 1328
1329 return user; 1329 return user;
1330 } 1330 }
1331 1331
1332 } // namespace chromeos 1332 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/android/net/external_estimate_provider_android.cc ('k') | chrome/browser/extensions/extension_error_reporter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698