| Index: chrome/browser/extensions/api/tabs/tabs_api.cc
|
| diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc
|
| index 177698b372d8d6313c00750c28287e18915feb12..fb448f7971c488fbccf548c734d63c4e4d2e6cfe 100644
|
| --- a/chrome/browser/extensions/api/tabs/tabs_api.cc
|
| +++ b/chrome/browser/extensions/api/tabs/tabs_api.cc
|
| @@ -17,6 +17,7 @@
|
| #include "base/logging.h"
|
| #include "base/memory/ptr_util.h"
|
| #include "base/memory/ref_counted_memory.h"
|
| +#include "base/metrics/histogram_macros.h"
|
| #include "base/single_thread_task_runner.h"
|
| #include "base/stl_util.h"
|
| #include "base/strings/pattern.h"
|
| @@ -199,6 +200,11 @@ void AssignOptionalValue(const std::unique_ptr<T>& source,
|
| }
|
| }
|
|
|
| +void ReportRequestedWindowState(windows::WindowState state) {
|
| + UMA_HISTOGRAM_ENUMERATION("TabsApi.RequestedWindowState", state,
|
| + windows::WINDOW_STATE_LAST + 1);
|
| +}
|
| +
|
| ui::WindowShowState ConvertToWindowShowState(windows::WindowState state) {
|
| switch (state) {
|
| case windows::WINDOW_STATE_NORMAL:
|
| @@ -489,6 +495,10 @@ ExtensionFunction::ResponseAction WindowsCreateFunction::Run() {
|
| std::string extension_id;
|
|
|
| if (create_data) {
|
| + // Report UMA stats to decide when to remove the deprecated "docked" windows
|
| + // state (crbug.com/703733).
|
| + ReportRequestedWindowState(create_data->state);
|
| +
|
| // Figure out window type before figuring out bounds so that default
|
| // bounds can be set according to the window type.
|
| switch (create_data->type) {
|
| @@ -669,6 +679,10 @@ ExtensionFunction::ResponseAction WindowsUpdateFunction::Run() {
|
| return RespondNow(Error(error));
|
| }
|
|
|
| + // Report UMA stats to decide when to remove the deprecated "docked" windows
|
| + // state (crbug.com/703733).
|
| + ReportRequestedWindowState(params->update_info.state);
|
| +
|
| ui::WindowShowState show_state =
|
| ConvertToWindowShowState(params->update_info.state);
|
|
|
|
|