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

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

Issue 11946017: Remove old cloud policy code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Actually upload the code I intended to upload. Created 7 years, 11 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 | 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/user_cloud_policy_store_chromeos.h" 5 #include "chrome/browser/policy/user_cloud_policy_store_chromeos.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 16 matching lines...) Expand all
27 // Subdirectory in the user's profile for storing user policies. 27 // Subdirectory in the user's profile for storing user policies.
28 const FilePath::CharType kPolicyDir[] = FILE_PATH_LITERAL("Device Management"); 28 const FilePath::CharType kPolicyDir[] = FILE_PATH_LITERAL("Device Management");
29 // File in the above directory for stroing user policy dmtokens. 29 // File in the above directory for stroing user policy dmtokens.
30 const FilePath::CharType kTokenCacheFile[] = FILE_PATH_LITERAL("Token"); 30 const FilePath::CharType kTokenCacheFile[] = FILE_PATH_LITERAL("Token");
31 // File in the above directory for storing user policy data. 31 // File in the above directory for storing user policy data.
32 const FilePath::CharType kPolicyCacheFile[] = FILE_PATH_LITERAL("Policy"); 32 const FilePath::CharType kPolicyCacheFile[] = FILE_PATH_LITERAL("Policy");
33 } // namespace 33 } // namespace
34 34
35 35
36 // Helper class for loading legacy policy caches. 36 // Helper class for loading legacy policy caches.
37 class LegacyPolicyCacheLoader : public UserPolicyTokenCache::Delegate, 37 class LegacyPolicyCacheLoader : public UserPolicyTokenLoader::Delegate,
38 public UserPolicyDiskCache::Delegate { 38 public UserPolicyDiskCache::Delegate {
39 public: 39 public:
40 typedef base::Callback<void(const std::string&, 40 typedef base::Callback<void(const std::string&,
41 const std::string&, 41 const std::string&,
42 CloudPolicyStore::Status, 42 CloudPolicyStore::Status,
43 scoped_ptr<em::PolicyFetchResponse>)> Callback; 43 scoped_ptr<em::PolicyFetchResponse>)> Callback;
44 44
45 LegacyPolicyCacheLoader(const FilePath& token_cache_file, 45 LegacyPolicyCacheLoader(const FilePath& token_cache_file,
46 const FilePath& policy_cache_file); 46 const FilePath& policy_cache_file);
47 virtual ~LegacyPolicyCacheLoader(); 47 virtual ~LegacyPolicyCacheLoader();
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 NotifyStoreLoaded(); 340 NotifyStoreLoaded();
341 } 341 }
342 342
343 // static 343 // static
344 void UserCloudPolicyStoreChromeOS::RemoveLegacyCacheDir(const FilePath& dir) { 344 void UserCloudPolicyStoreChromeOS::RemoveLegacyCacheDir(const FilePath& dir) {
345 if (file_util::PathExists(dir) && !file_util::Delete(dir, true)) 345 if (file_util::PathExists(dir) && !file_util::Delete(dir, true))
346 LOG(ERROR) << "Failed to remove cache dir " << dir.value(); 346 LOG(ERROR) << "Failed to remove cache dir " << dir.value();
347 } 347 }
348 348
349 } // namespace policy 349 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698