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

Side by Side Diff: chrome/browser/download/download_prefs.cc

Issue 18199003: Allow Chrome OS login profile to have different default pref values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 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 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/download/download_prefs.h" 5 #include "chrome/browser/download/download_prefs.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 if (!extensions[i].empty() && 75 if (!extensions[i].empty() &&
76 download_util::GetFileDangerLevel(path) == download_util::NOT_DANGEROUS) 76 download_util::GetFileDangerLevel(path) == download_util::NOT_DANGEROUS)
77 auto_open_.insert(path.value()); 77 auto_open_.insert(path.value());
78 } 78 }
79 } 79 }
80 80
81 DownloadPrefs::~DownloadPrefs() { 81 DownloadPrefs::~DownloadPrefs() {
82 } 82 }
83 83
84 // static 84 // static
85 void DownloadPrefs::RegisterUserPrefs( 85 void DownloadPrefs::RegisterProfilePrefs(
86 user_prefs::PrefRegistrySyncable* registry) { 86 user_prefs::PrefRegistrySyncable* registry) {
87 registry->RegisterBooleanPref( 87 registry->RegisterBooleanPref(
88 prefs::kPromptForDownload, 88 prefs::kPromptForDownload,
89 false, 89 false,
90 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 90 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
91 registry->RegisterStringPref( 91 registry->RegisterStringPref(
92 prefs::kDownloadExtensionsToOpen, 92 prefs::kDownloadExtensionsToOpen,
93 std::string(), 93 std::string(),
94 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 94 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
95 registry->RegisterBooleanPref( 95 registry->RegisterBooleanPref(
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 extensions.erase(extensions.size() - 1); 236 extensions.erase(extensions.size() - 1);
237 237
238 profile_->GetPrefs()->SetString(prefs::kDownloadExtensionsToOpen, extensions); 238 profile_->GetPrefs()->SetString(prefs::kDownloadExtensionsToOpen, extensions);
239 } 239 }
240 240
241 bool DownloadPrefs::AutoOpenCompareFunctor::operator()( 241 bool DownloadPrefs::AutoOpenCompareFunctor::operator()(
242 const base::FilePath::StringType& a, 242 const base::FilePath::StringType& a,
243 const base::FilePath::StringType& b) const { 243 const base::FilePath::StringType& b) const {
244 return base::FilePath::CompareLessIgnoreCase(a, b); 244 return base::FilePath::CompareLessIgnoreCase(a, b);
245 } 245 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_prefs.h ('k') | chrome/browser/extensions/api/commands/command_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698