OLD | NEW |
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/file_system_provider/registry.h" | 5 #include "chrome/browser/chromeos/file_system_provider/registry.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "base/prefs/scoped_user_pref_update.h" | 9 #include "base/prefs/scoped_user_pref_update.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 const char kPrefKeySource[] = "source"; | 29 const char kPrefKeySource[] = "source"; |
30 const char kPrefKeySupportsNotifyTag[] = "supports-notify-tag"; | 30 const char kPrefKeySupportsNotifyTag[] = "supports-notify-tag"; |
31 const char kPrefKeyWatchers[] = "watchers"; | 31 const char kPrefKeyWatchers[] = "watchers"; |
32 const char kPrefKeyWatcherEntryPath[] = "entry-path"; | 32 const char kPrefKeyWatcherEntryPath[] = "entry-path"; |
33 const char kPrefKeyWatcherRecursive[] = "recursive"; | 33 const char kPrefKeyWatcherRecursive[] = "recursive"; |
34 const char kPrefKeyWatcherLastTag[] = "last-tag"; | 34 const char kPrefKeyWatcherLastTag[] = "last-tag"; |
35 const char kPrefKeyWatcherPersistentOrigins[] = "persistent-origins"; | 35 const char kPrefKeyWatcherPersistentOrigins[] = "persistent-origins"; |
36 const char kPrefKeyOpenedFilesLimit[] = "opened-files-limit"; | 36 const char kPrefKeyOpenedFilesLimit[] = "opened-files-limit"; |
37 | 37 |
38 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 38 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
39 registry->RegisterDictionaryPref( | 39 registry->RegisterDictionaryPref(prefs::kFileSystemProviderMounted); |
40 prefs::kFileSystemProviderMounted, | |
41 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | |
42 } | 40 } |
43 | 41 |
44 std::string SourceToString(Source source) { | 42 std::string SourceToString(Source source) { |
45 switch (source) { | 43 switch (source) { |
46 case SOURCE_UNKNOWN: | 44 case SOURCE_UNKNOWN: |
47 return "unknown"; | 45 return "unknown"; |
48 case SOURCE_FILE: | 46 case SOURCE_FILE: |
49 return "file"; | 47 return "file"; |
50 case SOURCE_DEVICE: | 48 case SOURCE_DEVICE: |
51 return "device"; | 49 return "device"; |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 LOG(ERROR) << "Broken preferences detected while updating a tag."; | 313 LOG(ERROR) << "Broken preferences detected while updating a tag."; |
316 return; | 314 return; |
317 } | 315 } |
318 | 316 |
319 watcher_value->SetStringWithoutPathExpansion(kPrefKeyWatcherLastTag, | 317 watcher_value->SetStringWithoutPathExpansion(kPrefKeyWatcherLastTag, |
320 watcher.last_tag); | 318 watcher.last_tag); |
321 } | 319 } |
322 | 320 |
323 } // namespace file_system_provider | 321 } // namespace file_system_provider |
324 } // namespace chromeos | 322 } // namespace chromeos |
OLD | NEW |