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

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

Issue 898003002: [Cleanup] Const-correct the profile() method for the EasyUnlockService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 10 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 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_misc.h" 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_misc.h"
6 6
7 #include "ash/frame/frame_util.h" 7 #include "ash/frame/frame_util.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 profile_info->is_current_profile = true; 90 profile_info->is_current_profile = true;
91 91
92 result_profiles.push_back(profile_info); 92 result_profiles.push_back(profile_info);
93 } 93 }
94 94
95 return result_profiles; 95 return result_profiles;
96 } 96 }
97 } // namespace 97 } // namespace
98 98
99 bool FileManagerPrivateLogoutUserForReauthenticationFunction::RunSync() { 99 bool FileManagerPrivateLogoutUserForReauthenticationFunction::RunSync() {
100 user_manager::User* user = 100 const user_manager::User* user =
101 chromeos::ProfileHelper::Get()->GetUserByProfile(GetProfile()); 101 chromeos::ProfileHelper::Get()->GetUserByProfile(GetProfile());
102 if (user) { 102 if (user) {
103 user_manager::UserManager::Get()->SaveUserOAuthStatus( 103 user_manager::UserManager::Get()->SaveUserOAuthStatus(
104 user->email(), user_manager::User::OAUTH2_TOKEN_STATUS_INVALID); 104 user->email(), user_manager::User::OAUTH2_TOKEN_STATUS_INVALID);
105 } 105 }
106 106
107 chrome::AttemptUserExit(); 107 chrome::AttemptUserExit();
108 return true; 108 return true;
109 } 109 }
110 110
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 return true; 454 return true;
455 } 455 }
456 456
457 void FileManagerPrivateGetMimeTypeFunction::OnGetMimeType( 457 void FileManagerPrivateGetMimeTypeFunction::OnGetMimeType(
458 const std::string& mimeType) { 458 const std::string& mimeType) {
459 SetResult(new base::StringValue(mimeType)); 459 SetResult(new base::StringValue(mimeType));
460 SendResponse(true); 460 SendResponse(true);
461 } 461 }
462 462
463 } // namespace extensions 463 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_system_util.cc ('k') | chrome/browser/chromeos/extensions/first_run_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698