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

Side by Side Diff: chrome/browser/chromeos/policy/remote_commands/screenshot_delegate.cc

Issue 1923943003: Add logging to remote commands (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused include Created 4 years, 7 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/chromeos/policy/remote_commands/screenshot_delegate.h" 5 #include "chrome/browser/chromeos/policy/remote_commands/screenshot_delegate.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 9 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
10 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" 10 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 std::unique_ptr<UploadJob> ScreenshotDelegate::CreateUploadJob( 49 std::unique_ptr<UploadJob> ScreenshotDelegate::CreateUploadJob(
50 const GURL& upload_url, 50 const GURL& upload_url,
51 UploadJob::Delegate* delegate) { 51 UploadJob::Delegate* delegate) {
52 chromeos::DeviceOAuth2TokenService* device_oauth2_token_service = 52 chromeos::DeviceOAuth2TokenService* device_oauth2_token_service =
53 chromeos::DeviceOAuth2TokenServiceFactory::Get(); 53 chromeos::DeviceOAuth2TokenServiceFactory::Get();
54 54
55 scoped_refptr<net::URLRequestContextGetter> system_request_context = 55 scoped_refptr<net::URLRequestContextGetter> system_request_context =
56 g_browser_process->system_request_context(); 56 g_browser_process->system_request_context();
57 std::string robot_account_id = 57 std::string robot_account_id =
58 device_oauth2_token_service->GetRobotAccountId(); 58 device_oauth2_token_service->GetRobotAccountId();
59
60 LOG(WARNING) << "Creating upload job for screenshot";
59 return std::unique_ptr<UploadJob>(new UploadJobImpl( 61 return std::unique_ptr<UploadJob>(new UploadJobImpl(
60 upload_url, robot_account_id, device_oauth2_token_service, 62 upload_url, robot_account_id, device_oauth2_token_service,
61 system_request_context, delegate, 63 system_request_context, delegate,
62 base::WrapUnique(new UploadJobImpl::RandomMimeBoundaryGenerator))); 64 base::WrapUnique(new UploadJobImpl::RandomMimeBoundaryGenerator)));
63 } 65 }
64 66
65 void ScreenshotDelegate::StoreScreenshot( 67 void ScreenshotDelegate::StoreScreenshot(
66 const ui::GrabWindowSnapshotAsyncPNGCallback& callback, 68 const ui::GrabWindowSnapshotAsyncPNGCallback& callback,
67 scoped_refptr<base::RefCountedBytes> png_data) { 69 scoped_refptr<base::RefCountedBytes> png_data) {
68 callback.Run(png_data); 70 callback.Run(png_data);
69 } 71 }
70 72
71 } // namespace policy 73 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698