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

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

Issue 63153003: mac: Prepare for -Wunused-functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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 | Annotate | Revision Log
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 "chrome/browser/policy/browser_policy_connector.h" 5 #include "chrome/browser/policy/browser_policy_connector.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 "https://m.google.com/devicemanagement/data/api"; 101 "https://m.google.com/devicemanagement/data/api";
102 102
103 #if defined(OS_CHROMEOS) 103 #if defined(OS_CHROMEOS)
104 // Install attributes for tests. 104 // Install attributes for tests.
105 EnterpriseInstallAttributes* g_testing_install_attributes = NULL; 105 EnterpriseInstallAttributes* g_testing_install_attributes = NULL;
106 #endif // defined(OS_CHROMEOS) 106 #endif // defined(OS_CHROMEOS)
107 107
108 // Used in BrowserPolicyConnector::SetPolicyProviderForTesting. 108 // Used in BrowserPolicyConnector::SetPolicyProviderForTesting.
109 ConfigurationPolicyProvider* g_testing_provider = NULL; 109 ConfigurationPolicyProvider* g_testing_provider = NULL;
110 110
111 #if defined(OS_CHROMEOS)
111 // Helper that returns a new SequencedTaskRunner backed by the blocking pool. 112 // Helper that returns a new SequencedTaskRunner backed by the blocking pool.
112 // Each SequencedTaskRunner returned is independent from the others. 113 // Each SequencedTaskRunner returned is independent from the others.
113 scoped_refptr<base::SequencedTaskRunner> GetBackgroundTaskRunner() { 114 scoped_refptr<base::SequencedTaskRunner> GetBackgroundTaskRunner() {
114 base::SequencedWorkerPool* pool = BrowserThread::GetBlockingPool(); 115 base::SequencedWorkerPool* pool = BrowserThread::GetBlockingPool();
115 CHECK(pool); 116 CHECK(pool);
116 return pool->GetSequencedTaskRunnerWithShutdownBehavior( 117 return pool->GetSequencedTaskRunnerWithShutdownBehavior(
117 pool->GetSequenceToken(), base::SequencedWorkerPool::SKIP_ON_SHUTDOWN); 118 pool->GetSequenceToken(), base::SequencedWorkerPool::SKIP_ON_SHUTDOWN);
118 } 119 }
120 #endif // defined(OS_CHROMEOS)
119 121
120 #if defined(OS_MACOSX) && !defined(OS_IOS) 122 #if defined(OS_MACOSX) && !defined(OS_IOS)
121 base::FilePath GetManagedPolicyPath() { 123 base::FilePath GetManagedPolicyPath() {
122 // This constructs the path to the plist file in which Mac OS X stores the 124 // This constructs the path to the plist file in which Mac OS X stores the
123 // managed preference for the application. This is undocumented and therefore 125 // managed preference for the application. This is undocumented and therefore
124 // fragile, but if it doesn't work out, AsyncPolicyLoader has a task that 126 // fragile, but if it doesn't work out, AsyncPolicyLoader has a task that
125 // polls periodically in order to reload managed preferences later even if we 127 // polls periodically in order to reload managed preferences later even if we
126 // missed the change. 128 // missed the change.
127 base::FilePath path; 129 base::FilePath path;
128 if (!PathService::Get(chrome::DIR_MANAGED_PREFS, &path)) 130 if (!PathService::Get(chrome::DIR_MANAGED_PREFS, &path))
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 return new AsyncPolicyProvider(loader.Pass()); 613 return new AsyncPolicyProvider(loader.Pass());
612 } else { 614 } else {
613 return NULL; 615 return NULL;
614 } 616 }
615 #else 617 #else
616 return NULL; 618 return NULL;
617 #endif 619 #endif
618 } 620 }
619 621
620 } // namespace policy 622 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/password_syncable_service.cc ('k') | chrome/browser/renderer_host/pepper/pepper_talk_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698