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

Side by Side Diff: chrome/browser/policy/policy_path_parser_mac.mm

Issue 1986823002: Reset user data directory and disk cache directory after downgrade. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/policy_path_parser.h" 5 #include "chrome/browser/policy/policy_path_parser.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #import <SystemConfiguration/SCDynamicStore.h> 9 #import <SystemConfiguration/SCDynamicStore.h>
10 #import <SystemConfiguration/SCDynamicStoreCopySpecific.h> 10 #import <SystemConfiguration/SCDynamicStoreCopySpecific.h>
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; 107 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
108 NSString* value = [defaults stringForKey:key]; 108 NSString* value = [defaults stringForKey:key];
109 if (value && [defaults objectIsForcedForKey:key]) { 109 if (value && [defaults objectIsForcedForKey:key]) {
110 std::string string_value = base::SysNSStringToUTF8(value); 110 std::string string_value = base::SysNSStringToUTF8(value);
111 // Now replace any vars the user might have used. 111 // Now replace any vars the user might have used.
112 string_value = policy::path_parser::ExpandPathVariables(string_value); 112 string_value = policy::path_parser::ExpandPathVariables(string_value);
113 *user_data_dir = base::FilePath(string_value); 113 *user_data_dir = base::FilePath(string_value);
114 } 114 }
115 } 115 }
116 116
117 void CheckDiskCacheDirPolicy(base::FilePath* user_data_dir) {
118 // This function is not implemented in Mac because it's only used by the
119 // feature in Windows.
120 NOTREACHED();
121 }
122
117 } // namespace path_parser 123 } // namespace path_parser
118 124
119 } // namespace policy 125 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/policy_path_parser_linux.cc ('k') | chrome/browser/policy/policy_path_parser_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698