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

Side by Side Diff: chrome/browser/policy/policy_browsertest.cc

Issue 1552863003: Global conversion of Pass()→std::move(): CrOS edition (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7
8 #include <algorithm> 7 #include <algorithm>
9 #include <string> 8 #include <string>
9 #include <utility>
10 #include <vector> 10 #include <vector>
11 11
12 #include "ash/display/display_manager.h" 12 #include "ash/display/display_manager.h"
13 #include "base/bind.h" 13 #include "base/bind.h"
14 #include "base/bind_helpers.h" 14 #include "base/bind_helpers.h"
15 #include "base/callback.h" 15 #include "base/callback.h"
16 #include "base/command_line.h" 16 #include "base/command_line.h"
17 #include "base/files/file_enumerator.h" 17 #include "base/files/file_enumerator.h"
18 #include "base/files/file_path.h" 18 #include "base/files/file_path.h"
19 #include "base/files/file_util.h" 19 #include "base/files/file_util.h"
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 706
707 void TestScreenshotFile(bool enabled) { 707 void TestScreenshotFile(bool enabled) {
708 // AddObserver is an ash-specific method, so just replace the screenshot 708 // AddObserver is an ash-specific method, so just replace the screenshot
709 // grabber with one we've created here. 709 // grabber with one we've created here.
710 scoped_ptr<ChromeScreenshotGrabber> chrome_screenshot_grabber( 710 scoped_ptr<ChromeScreenshotGrabber> chrome_screenshot_grabber(
711 new ChromeScreenshotGrabber); 711 new ChromeScreenshotGrabber);
712 // ScreenshotGrabber doesn't own this observer, so the observer's lifetime 712 // ScreenshotGrabber doesn't own this observer, so the observer's lifetime
713 // is tied to the test instead. 713 // is tied to the test instead.
714 chrome_screenshot_grabber->screenshot_grabber()->AddObserver(&observer_); 714 chrome_screenshot_grabber->screenshot_grabber()->AddObserver(&observer_);
715 ash::Shell::GetInstance()->accelerator_controller()->SetScreenshotDelegate( 715 ash::Shell::GetInstance()->accelerator_controller()->SetScreenshotDelegate(
716 chrome_screenshot_grabber.Pass()); 716 std::move(chrome_screenshot_grabber));
717 717
718 SetScreenshotPolicy(enabled); 718 SetScreenshotPolicy(enabled);
719 ash::Shell::GetInstance()->accelerator_controller()->PerformActionIfEnabled( 719 ash::Shell::GetInstance()->accelerator_controller()->PerformActionIfEnabled(
720 ash::TAKE_SCREENSHOT); 720 ash::TAKE_SCREENSHOT);
721 721
722 content::RunMessageLoop(); 722 content::RunMessageLoop();
723 static_cast<ChromeScreenshotGrabber*>(ash::Shell::GetInstance() 723 static_cast<ChromeScreenshotGrabber*>(ash::Shell::GetInstance()
724 ->accelerator_controller() 724 ->accelerator_controller()
725 ->screenshot_delegate()) 725 ->screenshot_delegate())
726 ->screenshot_grabber() 726 ->screenshot_grabber()
(...skipping 3211 matching lines...) Expand 10 before | Expand all | Expand 10 after
3938 POLICY_SCOPE_USER, 3938 POLICY_SCOPE_USER,
3939 POLICY_SOURCE_CLOUD, 3939 POLICY_SOURCE_CLOUD,
3940 new base::FundamentalValue(false), 3940 new base::FundamentalValue(false),
3941 NULL); 3941 NULL);
3942 UpdateProviderPolicy(policies); 3942 UpdateProviderPolicy(policies);
3943 EXPECT_FALSE(display_manager->unified_desktop_enabled()); 3943 EXPECT_FALSE(display_manager->unified_desktop_enabled());
3944 } 3944 }
3945 #endif // defined(OS_CHROMEOS) 3945 #endif // defined(OS_CHROMEOS)
3946 3946
3947 } // namespace policy 3947 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698