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

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

Issue 67253003: Reland: Move ExtensionProcessManager to src/extensions, part 4 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase process_manager Created 7 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/file_manager/file_browser_handlers.h" 5 #include "chrome/browser/chromeos/file_manager/file_browser_handlers.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/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 namespace file_manager { 44 namespace file_manager {
45 namespace file_browser_handlers { 45 namespace file_browser_handlers {
46 namespace { 46 namespace {
47 47
48 // Returns process id of the process the extension is running in. 48 // Returns process id of the process the extension is running in.
49 int ExtractProcessFromExtensionId(Profile* profile, 49 int ExtractProcessFromExtensionId(Profile* profile,
50 const std::string& extension_id) { 50 const std::string& extension_id) {
51 GURL extension_url = 51 GURL extension_url =
52 Extension::GetBaseURLFromExtensionId(extension_id); 52 Extension::GetBaseURLFromExtensionId(extension_id);
53 ExtensionProcessManager* manager = 53 extensions::ProcessManager* manager =
54 extensions::ExtensionSystem::Get(profile)->process_manager(); 54 extensions::ExtensionSystem::Get(profile)->process_manager();
55 55
56 SiteInstance* site_instance = manager->GetSiteInstanceForURL(extension_url); 56 SiteInstance* site_instance = manager->GetSiteInstanceForURL(extension_url);
57 if (!site_instance || !site_instance->HasProcess()) 57 if (!site_instance || !site_instance->HasProcess())
58 return -1; 58 return -1;
59 content::RenderProcessHost* process = site_instance->GetProcess(); 59 content::RenderProcessHost* process = site_instance->GetProcess();
60 60
61 return process->GetID(); 61 return process->GetID();
62 } 62 }
63 63
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 common_handlers.erase(gallery_iter); 546 common_handlers.erase(gallery_iter);
547 else 547 else
548 common_handlers.erase(watch_iter); 548 common_handlers.erase(watch_iter);
549 } 549 }
550 550
551 return common_handlers; 551 return common_handlers;
552 } 552 }
553 553
554 } // namespace file_browser_handlers 554 } // namespace file_browser_handlers
555 } // namespace file_manager 555 } // namespace file_manager
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/devtools/devtools_sanity_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698