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

Side by Side Diff: chrome/browser/chromeos/accessibility/magnification_manager_browsertest.cc

Issue 16625004: components: Move user_prefs into user_prefs namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 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 (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 "ash/magnifier/magnification_controller.h" 5 #include "ash/magnifier/magnification_controller.h"
6 #include "ash/shell.h" 6 #include "ash/shell.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 10 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 return MagnificationManager::Get()->IsMagnifierEnabled(); 63 return MagnificationManager::Get()->IsMagnifierEnabled();
64 } 64 }
65 65
66 Profile* profile() { 66 Profile* profile() {
67 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord(); 67 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord();
68 DCHECK(profile); 68 DCHECK(profile);
69 return profile; 69 return profile;
70 } 70 }
71 71
72 PrefService* prefs() { 72 PrefService* prefs() {
73 return components::UserPrefs::Get(profile()); 73 return user_prefs::UserPrefs::Get(profile());
74 } 74 }
75 75
76 void EnableScreenManagnifierToPref(bool enabled) { 76 void EnableScreenManagnifierToPref(bool enabled) {
77 prefs()->SetBoolean(prefs::kScreenMagnifierEnabled, enabled); 77 prefs()->SetBoolean(prefs::kScreenMagnifierEnabled, enabled);
78 } 78 }
79 79
80 void SetScreenManagnifierTypeToPref(ash::MagnifierType type) { 80 void SetScreenManagnifierTypeToPref(ash::MagnifierType type) {
81 prefs()->SetInteger(prefs::kScreenMagnifierType, type); 81 prefs()->SetInteger(prefs::kScreenMagnifierType, type);
82 } 82 }
83 83
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 // Enables full screen magnifier. 365 // Enables full screen magnifier.
366 SetMagnifierEnabled(true); 366 SetMagnifierEnabled(true);
367 EXPECT_TRUE(IsMagnifierEnabled()); 367 EXPECT_TRUE(IsMagnifierEnabled());
368 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 368 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
369 369
370 // Confirms that the actual scale is set to the maximum scale. 370 // Confirms that the actual scale is set to the maximum scale.
371 EXPECT_EQ(4.0, GetFullScreenMagnifierScale()); 371 EXPECT_EQ(4.0, GetFullScreenMagnifierScale());
372 } 372 }
373 373
374 } // namespace chromeos 374 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698