| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/webui/welcome_win10_handler.h" | 5 #include "chrome/browser/ui/webui/welcome_win10_handler.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/metrics/histogram_functions.h" | 8 #include "base/metrics/histogram_functions.h" |
| 9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
| 10 #include "base/metrics/user_metrics.h" | 10 #include "base/metrics/user_metrics.h" |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 // Cache the value. | 164 // Cache the value. |
| 165 pinned_state_result_.emplace(is_pinned_to_taskbar); | 165 pinned_state_result_.emplace(is_pinned_to_taskbar); |
| 166 | 166 |
| 167 // If the page already called getPinnedToTaskbarState(), the result can be | 167 // If the page already called getPinnedToTaskbarState(), the result can be |
| 168 // sent back. | 168 // sent back. |
| 169 if (!pinned_state_callback_id_.empty()) | 169 if (!pinned_state_callback_id_.empty()) |
| 170 SendPinnedToTaskbarStateResult(); | 170 SendPinnedToTaskbarStateResult(); |
| 171 } | 171 } |
| 172 | 172 |
| 173 void WelcomeWin10Handler::SendPinnedToTaskbarStateResult() { | 173 void WelcomeWin10Handler::SendPinnedToTaskbarStateResult() { |
| 174 ResolveJavascriptCallback(base::StringValue(pinned_state_callback_id_), | 174 ResolveJavascriptCallback(base::Value(pinned_state_callback_id_), |
| 175 base::Value(pinned_state_result_.value())); | 175 base::Value(pinned_state_result_.value())); |
| 176 } | 176 } |
| OLD | NEW |