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

Side by Side Diff: chrome/browser/chromeos/arc/arc_migration_guide_notification.cc

Issue 2850123002: M58: arc: Set migration success notification pref. (Closed)
Patch Set: Fix some comment for M58 Created 3 years, 7 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
OLDNEW
(Empty)
1 // Copyright 2017 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/browser/chromeos/arc/arc_migration_guide_notification.h"
6
7 #include "chrome/browser/chromeos/arc/arc_util.h"
8 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
9 #include "chrome/common/pref_names.h"
10 #include "components/signin/core/account_id/account_id.h"
11 #include "components/user_manager/known_user.h"
12
13 namespace arc {
14
15 void ShowArcMigrationSuccessNotificationIfNeeded(Profile* profile) {
16 const AccountId account_id =
17 multi_user_util::GetAccountIdFromProfile(profile);
18
19 int pref_value = kFileSystemIncompatible;
20 user_manager::known_user::GetIntegerPref(
21 account_id, prefs::kArcCompatibleFilesystemChosen, &pref_value);
22
23 // Show notification only when the pref value indicates the file system is
24 // compatible, but not yet notified.
25 if (pref_value != kFileSystemCompatible)
26 return;
27
28 // TODO(kinaba): The acutual notificaiton is added here in M59.
29 // For M58, this function is deployed just for maintaining the pref value.
30
31 // Mark as notified.
32 user_manager::known_user::SetIntegerPref(
33 account_id, prefs::kArcCompatibleFilesystemChosen,
34 arc::kFileSystemCompatibleAndNotified);
35 }
36
37 } // namespace arc
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/arc_migration_guide_notification.h ('k') | chrome/browser/chromeos/arc/arc_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698