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

Unified Diff: chrome/browser/chromeos/file_system_provider/service.cc

Issue 375793003: [fsp] Rename file_system_name to display_name for consistency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed. Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/file_system_provider/service.cc
diff --git a/chrome/browser/chromeos/file_system_provider/service.cc b/chrome/browser/chromeos/file_system_provider/service.cc
index f0ac9602408640b2a4a3afc44dec7c82c24b1303..44c2ed5812c193d98c7582de444298ba3848817b 100644
--- a/chrome/browser/chromeos/file_system_provider/service.cc
+++ b/chrome/browser/chromeos/file_system_provider/service.cc
@@ -38,7 +38,7 @@ ProvidedFileSystemInterface* CreateProvidedFileSystem(
} // namespace
const char kPrefKeyFileSystemId[] = "file-system-id";
-const char kPrefKeyFileSystemName[] = "file-system-name";
+const char kPrefKeyDisplayName[] = "display-name";
void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterDictionaryPref(
@@ -97,7 +97,7 @@ void Service::SetFileSystemFactoryForTesting(
bool Service::MountFileSystem(const std::string& extension_id,
const std::string& file_system_id,
- const std::string& file_system_name) {
+ const std::string& display_name) {
DCHECK(thread_checker_.CalledOnValidThread());
// If already exists a file system provided by the same extension with this
@@ -149,7 +149,7 @@ bool Service::MountFileSystem(const std::string& extension_id,
// mount_point_name = b33f1337-41-5aa5
// mount_path = /provided/b33f1337-41-5aa5
ProvidedFileSystemInfo file_system_info(
- extension_id, file_system_id, file_system_name, mount_path);
+ extension_id, file_system_id, display_name, mount_path);
ProvidedFileSystemInterface* file_system =
file_system_factory_.Run(profile_, file_system_info);
@@ -331,7 +331,7 @@ void Service::RememberFileSystems() {
base::DictionaryValue* file_system = new base::DictionaryValue();
file_system->SetString(kPrefKeyFileSystemId, it->file_system_id());
- file_system->SetString(kPrefKeyFileSystemName, it->file_system_name());
+ file_system->SetString(kPrefKeyDisplayName, it->display_name());
file_systems->Append(file_system);
}
@@ -374,22 +374,22 @@ void Service::RestoreFileSystems(const std::string& extension_id) {
file_system->GetString(kPrefKeyFileSystemId, &file_system_id);
DCHECK(!file_system_id.empty());
- std::string file_system_name;
- file_system->GetString(kPrefKeyFileSystemName, &file_system_name);
- DCHECK(!file_system_name.empty());
+ std::string display_name;
+ file_system->GetString(kPrefKeyDisplayName, &display_name);
+ DCHECK(!display_name.empty());
- if (file_system_id.empty() || file_system_name.empty()) {
+ if (file_system_id.empty() || display_name.empty()) {
LOG(ERROR)
<< "Malformed provided file system information in preferences.";
continue;
}
const bool result =
- MountFileSystem(extension_id, file_system_id, file_system_name);
+ MountFileSystem(extension_id, file_system_id, display_name);
if (!result) {
LOG(ERROR) << "Failed to restore a provided file system from "
<< "preferences: " << extension_id << ", " << file_system_id
- << ", " << file_system_name << ".";
+ << ", " << display_name << ".";
}
}
}

Powered by Google App Engine
This is Rietveld 408576698