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

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/display_options_handler.cc

Issue 204813006: Adds UMA for display color calibration in ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/metrics/actions/actions.xml » ('j') | tools/metrics/actions/actions.xml » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/options/chromeos/display_options_handler.h" 5 #include "chrome/browser/ui/webui/options/chromeos/display_options_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "ash/display/display_controller.h" 9 #include "ash/display/display_controller.h"
10 #include "ash/display/display_manager.h" 10 #include "ash/display/display_manager.h"
11 #include "ash/display/output_configurator_animation.h" 11 #include "ash/display/output_configurator_animation.h"
12 #include "ash/display/resolution_notification_controller.h" 12 #include "ash/display/resolution_notification_controller.h"
13 #include "ash/shell.h" 13 #include "ash/shell.h"
14 #include "base/bind.h" 14 #include "base/bind.h"
15 #include "base/logging.h" 15 #include "base/logging.h"
16 #include "base/metrics/user_metrics.h"
16 #include "base/strings/string_number_conversions.h" 17 #include "base/strings/string_number_conversions.h"
17 #include "base/strings/stringprintf.h" 18 #include "base/strings/stringprintf.h"
18 #include "base/values.h" 19 #include "base/values.h"
19 #include "chrome/browser/chromeos/display/display_preferences.h" 20 #include "chrome/browser/chromeos/display/display_preferences.h"
20 #include "content/public/browser/web_ui.h" 21 #include "content/public/browser/web_ui.h"
21 #include "grit/ash_strings.h" 22 #include "grit/ash_strings.h"
22 #include "grit/generated_resources.h" 23 #include "grit/generated_resources.h"
23 #include "ui/base/l10n/l10n_util.h" 24 #include "ui/base/l10n/l10n_util.h"
24 #include "ui/gfx/display.h" 25 #include "ui/gfx/display.h"
25 #include "ui/gfx/rect.h" 26 #include "ui/gfx/rect.h"
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 LOG(ERROR) << "Invalid profile: " << profile_value; 464 LOG(ERROR) << "Invalid profile: " << profile_value;
464 return; 465 return;
465 } 466 }
466 467
467 if (profile_id < ui::COLOR_PROFILE_STANDARD || 468 if (profile_id < ui::COLOR_PROFILE_STANDARD ||
468 profile_id > ui::COLOR_PROFILE_READING) { 469 profile_id > ui::COLOR_PROFILE_READING) {
469 LOG(ERROR) << "Invalid profile_id: " << profile_id; 470 LOG(ERROR) << "Invalid profile_id: " << profile_id;
470 return; 471 return;
471 } 472 }
472 473
474 base::RecordAction(base::UserMetricsAction("ColorProfileChanged"));
475
473 GetDisplayManager()->SetColorCalibrationProfile( 476 GetDisplayManager()->SetColorCalibrationProfile(
474 display_id, static_cast<ui::ColorCalibrationProfile>(profile_id)); 477 display_id, static_cast<ui::ColorCalibrationProfile>(profile_id));
475 SendAllDisplayInfo(); 478 SendAllDisplayInfo();
476 } 479 }
477 480
478 } // namespace options 481 } // namespace options
479 } // namespace chromeos 482 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/actions/actions.xml » ('j') | tools/metrics/actions/actions.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698