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

Side by Side Diff: chrome/browser/google_update_settings_linux.cc

Issue 115808: Respect Linux user prefs with regards to crash reporting. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: with nits fixed, also some minor fixes to breakpad_linux.cc Created 11 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/installer/util/google_update_settings.h"
6
7 #include "base/file_util.h"
8 #include "base/logging.h"
9 #include "base/path_service.h"
10 #include "chrome/common/chrome_paths.h"
11
12 // File name used in the user data dir to indicate consent.
13 static const char kConsentToSendStats[] = "Consent To Send Stats";
14
15 // static
16 bool GoogleUpdateSettings::GetCollectStatsConsent() {
17 FilePath consent_file;
18 PathService::Get(chrome::DIR_USER_DATA, &consent_file);
19 consent_file = consent_file.Append(kConsentToSendStats);
20 return file_util::PathExists(consent_file);
21 }
22
23 // static
24 bool GoogleUpdateSettings::SetCollectStatsConsent(bool consented) {
25 FilePath consent_dir;
26 PathService::Get(chrome::DIR_USER_DATA, &consent_dir);
27 if (!file_util::DirectoryExists(consent_dir))
28 return false;
29
30 FilePath consent_file = consent_dir.AppendASCII(kConsentToSendStats);
31 if (consented)
32 return file_util::WriteFile(consent_file, "", 0) == 0;
33 else
34 return file_util::Delete(consent_file, false);
35 }
36
37 // static
38 bool GoogleUpdateSettings::GetLanguage(std::wstring* language) {
39 NOTIMPLEMENTED();
40 return false;
41 }
OLDNEW
« no previous file with comments | « chrome/browser/first_run_gtk.cc ('k') | chrome/browser/google_update_settings_linux_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698