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

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

Issue 20609006: Add severity info to drive::EventLogger. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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_mount.h" 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_mount.h"
6 6
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/values.h" 8 #include "base/values.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/drive/file_system_interface.h" 10 #include "chrome/browser/chromeos/drive/file_system_interface.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 std::string file_url; 74 std::string file_url;
75 if (!args_->GetString(0, &file_url)) { 75 if (!args_->GetString(0, &file_url)) {
76 return false; 76 return false;
77 } 77 }
78 78
79 std::string mount_type_str; 79 std::string mount_type_str;
80 if (!args_->GetString(1, &mount_type_str)) { 80 if (!args_->GetString(1, &mount_type_str)) {
81 return false; 81 return false;
82 } 82 }
83 83
84 drive::util::Log("%s[%d] called. (source: '%s', type:'%s')", 84 drive::util::Log(logging::LOG_INFO,
85 "%s[%d] called. (source: '%s', type:'%s')",
85 name().c_str(), 86 name().c_str(),
86 request_id(), 87 request_id(),
87 file_url.empty() ? "(none)" : file_url.c_str(), 88 file_url.empty() ? "(none)" : file_url.c_str(),
88 mount_type_str.c_str()); 89 mount_type_str.c_str());
89 set_log_on_completion(true); 90 set_log_on_completion(true);
90 91
91 // Set default return source path to the empty string. 92 // Set default return source path to the empty string.
92 SetResult(new base::StringValue("")); 93 SetResult(new base::StringValue(""));
93 94
94 chromeos::MountType mount_type = 95 chromeos::MountType mount_type =
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 bool RemoveMountFunction::RunImpl() { 180 bool RemoveMountFunction::RunImpl() {
180 if (args_->GetSize() != 1) { 181 if (args_->GetSize() != 1) {
181 return false; 182 return false;
182 } 183 }
183 184
184 std::string mount_path; 185 std::string mount_path;
185 if (!args_->GetString(0, &mount_path)) { 186 if (!args_->GetString(0, &mount_path)) {
186 return false; 187 return false;
187 } 188 }
188 189
189 drive::util::Log("%s[%d] called. (mount_path: '%s')", 190 drive::util::Log(logging::LOG_INFO,
191 "%s[%d] called. (mount_path: '%s')",
190 name().c_str(), 192 name().c_str(),
191 request_id(), 193 request_id(),
192 mount_path.c_str()); 194 mount_path.c_str());
193 set_log_on_completion(true); 195 set_log_on_completion(true);
194 196
195 std::vector<GURL> file_paths; 197 std::vector<GURL> file_paths;
196 file_paths.push_back(GURL(mount_path)); 198 file_paths.push_back(GURL(mount_path));
197 GetSelectedFileInfo( 199 GetSelectedFileInfo(
198 render_view_host(), 200 render_view_host(),
199 profile(), 201 profile(),
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 ++it) { 249 ++it) {
248 mounts->Append(CreateValueFromMountPoint(profile_, 250 mounts->Append(CreateValueFromMountPoint(profile_,
249 it->second, 251 it->second,
250 extension_->id())); 252 extension_->id()));
251 log_string += separator + it->first; 253 log_string += separator + it->first;
252 separator = ", "; 254 separator = ", ";
253 } 255 }
254 256
255 log_string += "]"; 257 log_string += "]";
256 258
257 drive::util::Log("%s[%d] succeeded. (results: '%s', %" PRIuS " mount points)", 259 drive::util::Log(logging::LOG_INFO,
260 "%s[%d] succeeded. (results: '%s', %" PRIuS " mount points)",
258 name().c_str(), 261 name().c_str(),
259 request_id(), 262 request_id(),
260 log_string.c_str(), 263 log_string.c_str(),
261 mount_points.size()); 264 mount_points.size());
262 265
263 SendResponse(true); 266 SendResponse(true);
264 return true; 267 return true;
265 } 268 }
266 269
267 } // namespace file_manager 270 } // namespace file_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698