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

Side by Side Diff: chrome/browser/chromeos/file_manager/file_browser_handlers.cc

Issue 1201063002: Set up the infrastructure for Extension event metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/file_manager/file_browser_handlers.h" 5 #include "chrome/browser/chromeos/file_manager/file_browser_handlers.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 ++iter) { 402 ++iter) {
403 base::DictionaryValue* file_def = new base::DictionaryValue(); 403 base::DictionaryValue* file_def = new base::DictionaryValue();
404 file_entries->Append(file_def); 404 file_entries->Append(file_def);
405 file_def->SetString("fileSystemName", iter->file_system_name); 405 file_def->SetString("fileSystemName", iter->file_system_name);
406 file_def->SetString("fileSystemRoot", iter->file_system_root_url); 406 file_def->SetString("fileSystemRoot", iter->file_system_root_url);
407 file_def->SetString("fileFullPath", 407 file_def->SetString("fileFullPath",
408 "/" + iter->full_path.AsUTF8Unsafe()); 408 "/" + iter->full_path.AsUTF8Unsafe());
409 file_def->SetBoolean("fileIsDirectory", iter->is_directory); 409 file_def->SetBoolean("fileIsDirectory", iter->is_directory);
410 } 410 }
411 411
412 scoped_ptr<extensions::Event> event(new extensions::Event( 412 scoped_ptr<extensions::Event> event(
413 "fileBrowserHandler.onExecute", event_args.Pass())); 413 new extensions::Event(extensions::events::UNKNOWN,
414 "fileBrowserHandler.onExecute", event_args.Pass()));
414 event->restrict_to_browser_context = profile_; 415 event->restrict_to_browser_context = profile_;
415 router->DispatchEventToExtension(extension_->id(), event.Pass()); 416 router->DispatchEventToExtension(extension_->id(), event.Pass());
416 417
417 ExecuteDoneOnUIThread(true); 418 ExecuteDoneOnUIThread(true);
418 } 419 }
419 420
420 void FileBrowserHandlerExecutor::SetupHandlerHostFileAccessPermissions( 421 void FileBrowserHandlerExecutor::SetupHandlerHostFileAccessPermissions(
421 FileDefinitionList* file_definition_list, 422 FileDefinitionList* file_definition_list,
422 const Extension* extension, 423 const Extension* extension,
423 int handler_pid) { 424 int handler_pid) {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 if (common_handlers.empty()) 529 if (common_handlers.empty())
529 return FileBrowserHandlerList(); 530 return FileBrowserHandlerList();
530 } 531 }
531 } 532 }
532 533
533 return common_handlers; 534 return common_handlers;
534 } 535 }
535 536
536 } // namespace file_browser_handlers 537 } // namespace file_browser_handlers
537 } // namespace file_manager 538 } // namespace file_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698