| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/extensions/extension_message_bubble_controller.h" | 5 #include "chrome/browser/extensions/extension_message_bubble_controller.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 void ExtensionMessageBubbleController::Delegate::SetBubbleInfoBeenAcknowledged( | 73 void ExtensionMessageBubbleController::Delegate::SetBubbleInfoBeenAcknowledged( |
| 74 const std::string& extension_id, | 74 const std::string& extension_id, |
| 75 bool value) { | 75 bool value) { |
| 76 std::string pref_name = get_acknowledged_flag_pref_name(); | 76 std::string pref_name = get_acknowledged_flag_pref_name(); |
| 77 if (pref_name.empty()) | 77 if (pref_name.empty()) |
| 78 return; | 78 return; |
| 79 extensions::ExtensionPrefs* prefs = extensions::ExtensionPrefs::Get(profile_); | 79 extensions::ExtensionPrefs* prefs = extensions::ExtensionPrefs::Get(profile_); |
| 80 prefs->UpdateExtensionPref(extension_id, | 80 prefs->UpdateExtensionPref(extension_id, |
| 81 pref_name, | 81 pref_name, |
| 82 value ? new base::FundamentalValue(value) : NULL); | 82 value ? new base::Value(value) : NULL); |
| 83 } | 83 } |
| 84 | 84 |
| 85 std::string | 85 std::string |
| 86 ExtensionMessageBubbleController::Delegate::get_acknowledged_flag_pref_name() | 86 ExtensionMessageBubbleController::Delegate::get_acknowledged_flag_pref_name() |
| 87 const { | 87 const { |
| 88 return acknowledged_pref_name_; | 88 return acknowledged_pref_name_; |
| 89 } | 89 } |
| 90 | 90 |
| 91 void ExtensionMessageBubbleController::Delegate:: | 91 void ExtensionMessageBubbleController::Delegate:: |
| 92 set_acknowledged_flag_pref_name(const std::string& pref_name) { | 92 set_acknowledged_flag_pref_name(const std::string& pref_name) { |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 if (delegate_->ClearProfileSetAfterAction()) | 304 if (delegate_->ClearProfileSetAfterAction()) |
| 305 GetProfileSet()->clear(); | 305 GetProfileSet()->clear(); |
| 306 } | 306 } |
| 307 } | 307 } |
| 308 | 308 |
| 309 std::set<Profile*>* ExtensionMessageBubbleController::GetProfileSet() { | 309 std::set<Profile*>* ExtensionMessageBubbleController::GetProfileSet() { |
| 310 return &g_shown_for_profiles.Get()[delegate_->GetKey()]; | 310 return &g_shown_for_profiles.Get()[delegate_->GetKey()]; |
| 311 } | 311 } |
| 312 | 312 |
| 313 } // namespace extensions | 313 } // namespace extensions |
| OLD | NEW |