OLD | NEW |
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 using extensions::ExtensionHost; | 50 using extensions::ExtensionHost; |
51 | 51 |
52 namespace { | 52 namespace { |
53 | 53 |
54 std::string GetExtensionID(RenderViewHost* render_view_host) { | 54 std::string GetExtensionID(RenderViewHost* render_view_host) { |
55 // This works for both apps and extensions because the site has been | 55 // This works for both apps and extensions because the site has been |
56 // normalized to the extension URL for apps. | 56 // normalized to the extension URL for apps. |
57 if (!render_view_host->GetSiteInstance()) | 57 if (!render_view_host->GetSiteInstance()) |
58 return ""; | 58 return ""; |
59 | 59 |
60 return render_view_host->GetSiteInstance()->GetSite().host(); | 60 return render_view_host->GetSiteInstance()->GetSiteURL().host(); |
61 } | 61 } |
62 | 62 |
63 // Incognito profiles use this process manager. It is mostly a shim that decides | 63 // Incognito profiles use this process manager. It is mostly a shim that decides |
64 // whether to fall back on the original profile's ExtensionProcessManager based | 64 // whether to fall back on the original profile's ExtensionProcessManager based |
65 // on whether a given extension uses "split" or "spanning" incognito behavior. | 65 // on whether a given extension uses "split" or "spanning" incognito behavior. |
66 class IncognitoExtensionProcessManager : public ExtensionProcessManager { | 66 class IncognitoExtensionProcessManager : public ExtensionProcessManager { |
67 public: | 67 public: |
68 explicit IncognitoExtensionProcessManager(Profile* profile); | 68 explicit IncognitoExtensionProcessManager(Profile* profile); |
69 virtual ~IncognitoExtensionProcessManager() {} | 69 virtual ~IncognitoExtensionProcessManager() {} |
70 virtual ExtensionHost* CreateViewHost( | 70 virtual ExtensionHost* CreateViewHost( |
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 CreateBackgroundHostsForProfileStartup(GetProfile(), | 815 CreateBackgroundHostsForProfileStartup(GetProfile(), |
816 this, service->extensions()); | 816 this, service->extensions()); |
817 } | 817 } |
818 break; | 818 break; |
819 } | 819 } |
820 default: | 820 default: |
821 ExtensionProcessManager::Observe(type, source, details); | 821 ExtensionProcessManager::Observe(type, source, details); |
822 break; | 822 break; |
823 } | 823 } |
824 } | 824 } |
OLD | NEW |