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

Unified Diff: chrome/browser/prefs/command_line_pref_store.cc

Issue 545033002: Fix that switch "--disk-cache-dir" has no effect when specifying a path containing non-ascii charac… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « chrome/browser/prefs/command_line_pref_store.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/command_line_pref_store.cc
diff --git a/chrome/browser/prefs/command_line_pref_store.cc b/chrome/browser/prefs/command_line_pref_store.cc
index 22c4aa997bbde8143c3a9df46c9d53a1c0c98707..413e75b00f82ec91873103bfeea9d6a32ce10a25 100644
--- a/chrome/browser/prefs/command_line_pref_store.cc
+++ b/chrome/browser/prefs/command_line_pref_store.cc
@@ -7,6 +7,7 @@
#include <string>
#include <vector>
+#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
@@ -30,11 +31,15 @@ const CommandLinePrefStore::StringSwitchToPreferenceMapEntry
{ switches::kGSSAPILibraryName, prefs::kGSSAPILibraryName },
{ data_reduction_proxy::switches::kDataReductionProxy,
data_reduction_proxy::prefs::kDataReductionProxy },
- { switches::kDiskCacheDir, prefs::kDiskCacheDir },
{ switches::kSSLVersionMin, prefs::kSSLVersionMin },
{ switches::kSSLVersionMax, prefs::kSSLVersionMax },
};
+const CommandLinePrefStore::PathSwitchToPreferenceMapEntry
+ CommandLinePrefStore::path_switch_map_[] = {
+ { switches::kDiskCacheDir, prefs::kDiskCacheDir },
+};
+
const CommandLinePrefStore::BooleanSwitchToPreferenceMapEntry
CommandLinePrefStore::boolean_switch_map_[] = {
{ switches::kDisableAuthNegotiateCnameLookup,
@@ -103,6 +108,14 @@ void CommandLinePrefStore::ApplySimpleSwitches() {
}
}
+ for (size_t i = 0; i < arraysize(path_switch_map_); ++i) {
+ if (command_line_->HasSwitch(path_switch_map_[i].switch_name)) {
+ SetValue(path_switch_map_[i].preference_path,
+ new base::StringValue(command_line_->GetSwitchValuePath(
+ path_switch_map_[i].switch_name).value()));
+ }
+ }
+
for (size_t i = 0; i < arraysize(integer_switch_map_); ++i) {
if (command_line_->HasSwitch(integer_switch_map_[i].switch_name)) {
std::string str_value = command_line_->GetSwitchValueASCII(
« no previous file with comments | « chrome/browser/prefs/command_line_pref_store.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698