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

Side by Side Diff: chrome/browser/extensions/extension_process_manager.cc

Issue 12886023: Remove SandboxedPages and SandboxedCSP from Extension Class (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 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 (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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 12 matching lines...) Expand all
23 #include "chrome/browser/ui/browser_window.h" 23 #include "chrome/browser/ui/browser_window.h"
24 #include "chrome/browser/ui/tabs/tab_strip_model.h" 24 #include "chrome/browser/ui/tabs/tab_strip_model.h"
25 #include "chrome/browser/view_type_utils.h" 25 #include "chrome/browser/view_type_utils.h"
26 #include "chrome/common/chrome_notification_types.h" 26 #include "chrome/common/chrome_notification_types.h"
27 #include "chrome/common/chrome_switches.h" 27 #include "chrome/common/chrome_switches.h"
28 #include "chrome/common/extensions/background_info.h" 28 #include "chrome/common/extensions/background_info.h"
29 #include "chrome/common/extensions/extension.h" 29 #include "chrome/common/extensions/extension.h"
30 #include "chrome/common/extensions/extension_messages.h" 30 #include "chrome/common/extensions/extension_messages.h"
31 #include "chrome/common/extensions/manifest_handler.h" 31 #include "chrome/common/extensions/manifest_handler.h"
32 #include "chrome/common/extensions/manifest_url_handler.h" 32 #include "chrome/common/extensions/manifest_url_handler.h"
33 #include "chrome/common/extensions/sandboxed_handler.h"
33 #include "chrome/common/url_constants.h" 34 #include "chrome/common/url_constants.h"
34 #include "content/public/browser/browser_thread.h" 35 #include "content/public/browser/browser_thread.h"
35 #include "content/public/browser/notification_service.h" 36 #include "content/public/browser/notification_service.h"
36 #include "content/public/browser/render_process_host.h" 37 #include "content/public/browser/render_process_host.h"
37 #include "content/public/browser/render_view_host.h" 38 #include "content/public/browser/render_view_host.h"
38 #include "content/public/browser/site_instance.h" 39 #include "content/public/browser/site_instance.h"
39 #include "content/public/browser/web_contents.h" 40 #include "content/public/browser/web_contents.h"
40 #include "content/public/browser/web_contents_delegate.h" 41 #include "content/public/browser/web_contents_delegate.h"
41 #include "content/public/common/renderer_preferences.h" 42 #include "content/public/common/renderer_preferences.h"
42 43
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 } 175 }
175 event_page_suspending_time_ = base::TimeDelta::FromSeconds(5); 176 event_page_suspending_time_ = base::TimeDelta::FromSeconds(5);
176 unsigned suspending_time_sec = 0; 177 unsigned suspending_time_sec = 0;
177 if (base::StringToUint(CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 178 if (base::StringToUint(CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
178 switches::kEventPageSuspendingTime), &suspending_time_sec)) { 179 switches::kEventPageSuspendingTime), &suspending_time_sec)) {
179 event_page_suspending_time_ = base::TimeDelta::FromSeconds( 180 event_page_suspending_time_ = base::TimeDelta::FromSeconds(
180 suspending_time_sec); 181 suspending_time_sec);
181 } 182 }
182 183
183 (new BackgroundManifestHandler())->Register(); 184 (new BackgroundManifestHandler())->Register();
185 (new extensions::SandboxedHandler)->Register();
Yoyo Zhou 2013/03/20 22:53:53 Does this really belong in ExtensionProcessManager
Devlin 2013/03/23 22:26:25 Yeah, I wasn't really sure where to put this one..
184 } 186 }
185 187
186 ExtensionProcessManager::~ExtensionProcessManager() { 188 ExtensionProcessManager::~ExtensionProcessManager() {
187 CloseBackgroundHosts(); 189 CloseBackgroundHosts();
188 DCHECK(background_hosts_.empty()); 190 DCHECK(background_hosts_.empty());
189 } 191 }
190 192
191 const ExtensionProcessManager::ViewSet 193 const ExtensionProcessManager::ViewSet
192 ExtensionProcessManager::GetAllViews() const { 194 ExtensionProcessManager::GetAllViews() const {
193 ViewSet result; 195 ViewSet result;
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 if (service && service->is_ready()) 905 if (service && service->is_ready())
904 CreateBackgroundHostsForProfileStartup(); 906 CreateBackgroundHostsForProfileStartup();
905 } 907 }
906 break; 908 break;
907 } 909 }
908 default: 910 default:
909 ExtensionProcessManager::Observe(type, source, details); 911 ExtensionProcessManager::Observe(type, source, details);
910 break; 912 break;
911 } 913 }
912 } 914 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698