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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc

Issue 398753004: [cros] Move User class to user_manager component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/extensions/file_manager/private_api_drive.h" 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_drive.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/chromeos/drive/drive_integration_service.h" 9 #include "chrome/browser/chromeos/drive/drive_integration_service.h"
10 #include "chrome/browser/chromeos/extensions/file_manager/private_api_util.h" 10 #include "chrome/browser/chromeos/extensions/file_manager/private_api_util.h"
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 Profile* const owner_profile = drive::util::ExtractProfileFromPath(path); 849 Profile* const owner_profile = drive::util::ExtractProfileFromPath(path);
850 850
851 if (!owner_profile) 851 if (!owner_profile)
852 return false; 852 return false;
853 853
854 drive::FileSystemInterface* const owner_file_system = 854 drive::FileSystemInterface* const owner_file_system =
855 drive::util::GetFileSystemByProfile(owner_profile); 855 drive::util::GetFileSystemByProfile(owner_profile);
856 if (!owner_file_system) 856 if (!owner_file_system)
857 return false; 857 return false;
858 858
859 const chromeos::User* const user = 859 const user_manager::User* const user =
860 chromeos::ProfileHelper::Get()->GetUserByProfile(GetProfile()); 860 chromeos::ProfileHelper::Get()->GetUserByProfile(GetProfile());
861 if (!user || !user->is_logged_in()) 861 if (!user || !user->is_logged_in())
862 return false; 862 return false;
863 863
864 google_apis::drive::PermissionRole role = 864 google_apis::drive::PermissionRole role =
865 google_apis::drive::PERMISSION_ROLE_READER; 865 google_apis::drive::PERMISSION_ROLE_READER;
866 switch (params->share_type) { 866 switch (params->share_type) {
867 case api::file_browser_private::DRIVE_SHARE_TYPE_NONE: 867 case api::file_browser_private::DRIVE_SHARE_TYPE_NONE:
868 NOTREACHED(); 868 NOTREACHED();
869 return false; 869 return false;
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 return; 979 return;
980 } 980 }
981 981
982 const std::string url = download_url_ + "?access_token=" + access_token; 982 const std::string url = download_url_ + "?access_token=" + access_token;
983 SetResult(new base::StringValue(url)); 983 SetResult(new base::StringValue(url));
984 984
985 SendResponse(true); 985 SendResponse(true);
986 } 986 }
987 987
988 } // namespace extensions 988 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_system_util.cc ('k') | chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698