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

Side by Side Diff: chrome/browser/ui/app_list/google_now_extension.cc

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/ui/app_list/google_now_extension.h" 5 #include "chrome/browser/ui/app_list/google_now_extension.h"
6 6
7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/notifications/notifier_state_tracker.h" 7 #include "chrome/browser/notifications/notifier_state_tracker.h"
9 #include "chrome/browser/notifications/notifier_state_tracker_factory.h" 8 #include "chrome/browser/notifications/notifier_state_tracker_factory.h"
10 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
11 #include "components/prefs/pref_service.h"
12 #include "components/variations/variations_associated_data.h" 12 #include "components/variations/variations_associated_data.h"
13 #include "ui/message_center/notifier_settings.h" 13 #include "ui/message_center/notifier_settings.h"
14 14
15 namespace { 15 namespace {
16 const char kGoogleNowExtensionFieldTrialName[] = "GoogleNowExtension"; 16 const char kGoogleNowExtensionFieldTrialName[] = "GoogleNowExtension";
17 17
18 // Extension ID for previous Now notifications component. 18 // Extension ID for previous Now notifications component.
19 const char kNowNotifierId[] = "pafkbggdmjlpgkdkcbjmhmfcdpncadgh"; 19 const char kNowNotifierId[] = "pafkbggdmjlpgkdkcbjmhmfcdpncadgh";
20 }; // namespace 20 }; // namespace
21 21
(...skipping 18 matching lines...) Expand all
40 if (!enabled_pref->IsDefaultValue()) 40 if (!enabled_pref->IsDefaultValue())
41 return; 41 return;
42 42
43 NotifierStateTracker* const notifier_state_tracker = 43 NotifierStateTracker* const notifier_state_tracker =
44 NotifierStateTrackerFactory::GetForProfile(profile); 44 NotifierStateTrackerFactory::GetForProfile(profile);
45 bool notifier_enabled = notifier_state_tracker->IsNotifierEnabled( 45 bool notifier_enabled = notifier_state_tracker->IsNotifierEnabled(
46 message_center::NotifierId( 46 message_center::NotifierId(
47 message_center::NotifierId::APPLICATION, kNowNotifierId)); 47 message_center::NotifierId::APPLICATION, kNowNotifierId));
48 prefs->SetBoolean(prefs::kGoogleNowLauncherEnabled, notifier_enabled); 48 prefs->SetBoolean(prefs::kGoogleNowLauncherEnabled, notifier_enabled);
49 } 49 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/extension_app_model_builder_unittest.cc ('k') | chrome/browser/ui/app_list/start_page_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698