summaryrefslogtreecommitdiffstats
path: root/chrome/browser/notifications/notification_prefs_manager.cc
blob: a77eb63f2ee0c7c61cb1510da5672dddc3d1c0b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/notifications/notification_prefs_manager.h"

#include "base/prefs/pref_registry_simple.h"
#include "base/prefs/pref_service.h"
#include "chrome/common/pref_names.h"

NotificationPrefsManager::NotificationPrefsManager(PrefService* prefs) {
#if defined(OS_CHROMEOS)
  static bool have_cleared = false;

  if (!have_cleared) {
    // Option menu for changing desktop notification position on ChromeOS is
    // disabled. Force preference to default.
    prefs->ClearPref(prefs::kDesktopNotificationPosition);
    have_cleared = true;
  }
#endif
}

// static
void NotificationPrefsManager::RegisterPrefs(PrefRegistrySimple* registry) {
  registry->RegisterIntegerPref(prefs::kDesktopNotificationPosition,
                                BalloonCollection::DEFAULT_POSITION);
  registry->RegisterBooleanPref(prefs::kMessageCenterShowedFirstRunBalloon,
                                false);
}