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

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

Issue 1036723003: favor DCHECK_CURRENTLY_ON for better logs in chrome/browser/chromeos/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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_dialog.h" 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_dialog.h"
6 6
7 #include "chrome/browser/chromeos/extensions/file_manager/private_api_util.h" 7 #include "chrome/browser/chromeos/extensions/file_manager/private_api_util.h"
8 #include "chrome/browser/ui/views/select_file_dialog_extension.h" 8 #include "chrome/browser/ui/views/select_file_dialog_extension.h"
9 #include "chrome/common/extensions/api/file_manager_private.h" 9 #include "chrome/common/extensions/api/file_manager_private.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 base::Bind( 56 base::Bind(
57 &FileManagerPrivateSelectFileFunction::GetSelectedFileInfoResponse, 57 &FileManagerPrivateSelectFileFunction::GetSelectedFileInfoResponse,
58 this, 58 this,
59 params->index)); 59 params->index));
60 return true; 60 return true;
61 } 61 }
62 62
63 void FileManagerPrivateSelectFileFunction::GetSelectedFileInfoResponse( 63 void FileManagerPrivateSelectFileFunction::GetSelectedFileInfoResponse(
64 int index, 64 int index,
65 const std::vector<ui::SelectedFileInfo>& files) { 65 const std::vector<ui::SelectedFileInfo>& files) {
66 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 66 DCHECK_CURRENTLY_ON(BrowserThread::UI);
67 if (files.size() != 1) { 67 if (files.size() != 1) {
68 SendResponse(false); 68 SendResponse(false);
69 return; 69 return;
70 } 70 }
71 SelectFileDialogExtension::OnFileSelected(GetFileDialogRoutingID(this), 71 SelectFileDialogExtension::OnFileSelected(GetFileDialogRoutingID(this),
72 files[0], index); 72 files[0], index);
73 SendResponse(true); 73 SendResponse(true);
74 } 74 }
75 75
76 bool FileManagerPrivateSelectFilesFunction::RunAsync() { 76 bool FileManagerPrivateSelectFilesFunction::RunAsync() {
(...skipping 13 matching lines...) Expand all
90 file_manager::util::NEED_LOCAL_PATH_FOR_OPENING : 90 file_manager::util::NEED_LOCAL_PATH_FOR_OPENING :
91 file_manager::util::NO_LOCAL_PATH_RESOLUTION, 91 file_manager::util::NO_LOCAL_PATH_RESOLUTION,
92 base::Bind( 92 base::Bind(
93 &FileManagerPrivateSelectFilesFunction::GetSelectedFileInfoResponse, 93 &FileManagerPrivateSelectFilesFunction::GetSelectedFileInfoResponse,
94 this)); 94 this));
95 return true; 95 return true;
96 } 96 }
97 97
98 void FileManagerPrivateSelectFilesFunction::GetSelectedFileInfoResponse( 98 void FileManagerPrivateSelectFilesFunction::GetSelectedFileInfoResponse(
99 const std::vector<ui::SelectedFileInfo>& files) { 99 const std::vector<ui::SelectedFileInfo>& files) {
100 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 100 DCHECK_CURRENTLY_ON(BrowserThread::UI);
101 if (files.empty()) { 101 if (files.empty()) {
102 SendResponse(false); 102 SendResponse(false);
103 return; 103 return;
104 } 104 }
105 105
106 SelectFileDialogExtension::OnMultiFilesSelected(GetFileDialogRoutingID(this), 106 SelectFileDialogExtension::OnMultiFilesSelected(GetFileDialogRoutingID(this),
107 files); 107 files);
108 SendResponse(true); 108 SendResponse(true);
109 } 109 }
110 110
111 } // namespace extensions 111 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698