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

Side by Side Diff: chrome/browser/policy/chrome_browser_policy_connector.cc

Issue 2133083002: Remove all remaining traces of MessageLoopProxy. (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/policy/chrome_browser_policy_connector.h" 5 #include "chrome/browser/policy/chrome_browser_policy_connector.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 device_management_service->ScheduleInitialization( 89 device_management_service->ScheduleInitialization(
90 kServiceInitializationStartupDelay); 90 kServiceInitializationStartupDelay);
91 91
92 InitInternal(local_state, std::move(device_management_service)); 92 InitInternal(local_state, std::move(device_management_service));
93 } 93 }
94 94
95 ConfigurationPolicyProvider* 95 ConfigurationPolicyProvider*
96 ChromeBrowserPolicyConnector::CreatePlatformProvider() { 96 ChromeBrowserPolicyConnector::CreatePlatformProvider() {
97 #if defined(OS_WIN) 97 #if defined(OS_WIN)
98 std::unique_ptr<AsyncPolicyLoader> loader(PolicyLoaderWin::Create( 98 std::unique_ptr<AsyncPolicyLoader> loader(PolicyLoaderWin::Create(
99 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), 99 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE),
100 kRegistryChromePolicyKey)); 100 kRegistryChromePolicyKey));
101 return new AsyncPolicyProvider(GetSchemaRegistry(), std::move(loader)); 101 return new AsyncPolicyProvider(GetSchemaRegistry(), std::move(loader));
102 #elif defined(OS_MACOSX) 102 #elif defined(OS_MACOSX)
103 std::unique_ptr<AsyncPolicyLoader> loader(new PolicyLoaderMac( 103 std::unique_ptr<AsyncPolicyLoader> loader(new PolicyLoaderMac(
104 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), 104 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE),
105 GetManagedPolicyPath(), new MacPreferences())); 105 GetManagedPolicyPath(), new MacPreferences()));
106 return new AsyncPolicyProvider(GetSchemaRegistry(), std::move(loader)); 106 return new AsyncPolicyProvider(GetSchemaRegistry(), std::move(loader));
107 #elif defined(OS_POSIX) && !defined(OS_ANDROID) 107 #elif defined(OS_POSIX) && !defined(OS_ANDROID)
108 base::FilePath config_dir_path; 108 base::FilePath config_dir_path;
109 if (PathService::Get(chrome::DIR_POLICY_FILES, &config_dir_path)) { 109 if (PathService::Get(chrome::DIR_POLICY_FILES, &config_dir_path)) {
110 std::unique_ptr<AsyncPolicyLoader> loader(new ConfigDirPolicyLoader( 110 std::unique_ptr<AsyncPolicyLoader> loader(new ConfigDirPolicyLoader(
111 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), 111 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE),
112 config_dir_path, POLICY_SCOPE_MACHINE)); 112 config_dir_path, POLICY_SCOPE_MACHINE));
113 return new AsyncPolicyProvider(GetSchemaRegistry(), std::move(loader)); 113 return new AsyncPolicyProvider(GetSchemaRegistry(), std::move(loader));
114 } else { 114 } else {
115 return NULL; 115 return NULL;
116 } 116 }
117 #elif defined(OS_ANDROID) 117 #elif defined(OS_ANDROID)
118 return new policy::android::AndroidCombinedPolicyProvider( 118 return new policy::android::AndroidCombinedPolicyProvider(
119 GetSchemaRegistry()); 119 GetSchemaRegistry());
120 #else 120 #else
121 return NULL; 121 return NULL;
122 #endif 122 #endif
123 } 123 }
124 124
125 } // namespace policy 125 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugin_info_message_filter.cc ('k') | chrome/browser/policy/cloud/cloud_policy_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698