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

Side by Side Diff: chrome/browser/chromeos/extensions/file_handler_util.cc

Issue 11232066: Remove GetExtensionEventRouter from Profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rerebase Created 8 years, 1 month 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 (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/extensions/file_handler_util.h" 5 #include "chrome/browser/chromeos/extensions/file_handler_util.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/i18n/case_conversion.h" 9 #include "base/i18n/case_conversion.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 int handler_pid_in, 924 int handler_pid_in,
925 extensions::ExtensionHost* host) { 925 extensions::ExtensionHost* host) {
926 int handler_pid = host ? host->render_process_host()->GetID() : 926 int handler_pid = host ? host->render_process_host()->GetID() :
927 handler_pid_in; 927 handler_pid_in;
928 928
929 if (handler_pid <= 0) { 929 if (handler_pid <= 0) {
930 ExecuteDoneOnUIThread(false); 930 ExecuteDoneOnUIThread(false);
931 return; 931 return;
932 } 932 }
933 933
934 extensions::EventRouter* event_router = profile()->GetExtensionEventRouter(); 934 extensions::EventRouter* event_router =
935 extensions::ExtensionSystem::Get(profile())->event_router();
935 if (!event_router) { 936 if (!event_router) {
936 ExecuteDoneOnUIThread(false); 937 ExecuteDoneOnUIThread(false);
937 return; 938 return;
938 } 939 }
939 940
940 SetupHandlerHostFileAccessPermissions(handler_pid); 941 SetupHandlerHostFileAccessPermissions(handler_pid);
941 942
942 scoped_ptr<ListValue> event_args(new ListValue()); 943 scoped_ptr<ListValue> event_args(new ListValue());
943 event_args->Append(Value::CreateStringValue(action_id_)); 944 event_args->Append(Value::CreateStringValue(action_id_));
944 DictionaryValue* details = new DictionaryValue(); 945 DictionaryValue* details = new DictionaryValue();
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 // Make sure this url really being used by the right caller extension. 1060 // Make sure this url really being used by the right caller extension.
1060 if (source_url_.GetOrigin() != url.origin()) 1061 if (source_url_.GetOrigin() != url.origin())
1061 return false; 1062 return false;
1062 1063
1063 FilePath local_path = url.path(); 1064 FilePath local_path = url.path();
1064 extensions::LaunchPlatformAppWithPath(profile(), GetExtension(), local_path); 1065 extensions::LaunchPlatformAppWithPath(profile(), GetExtension(), local_path);
1065 return true; 1066 return true;
1066 } 1067 }
1067 1068
1068 } // namespace file_handler_util 1069 } // namespace file_handler_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698