| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/extensions/activity_log/activity_log.h" | 5 #include "chrome/browser/extensions/activity_log/activity_log.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 action = new Action(extension->id(), | 767 action = new Action(extension->id(), |
| 768 base::Time::Now(), | 768 base::Time::Now(), |
| 769 Action::ACTION_CONTENT_SCRIPT, | 769 Action::ACTION_CONTENT_SCRIPT, |
| 770 ""); // no API call here | 770 ""); // no API call here |
| 771 action->set_page_url(on_url); | 771 action->set_page_url(on_url); |
| 772 action->set_page_title(base::UTF16ToUTF8(web_contents->GetTitle())); | 772 action->set_page_title(base::UTF16ToUTF8(web_contents->GetTitle())); |
| 773 action->set_page_incognito( | 773 action->set_page_incognito( |
| 774 web_contents->GetBrowserContext()->IsOffTheRecord()); | 774 web_contents->GetBrowserContext()->IsOffTheRecord()); |
| 775 | 775 |
| 776 const prerender::PrerenderManager* prerender_manager = | 776 const prerender::PrerenderManager* prerender_manager = |
| 777 prerender::PrerenderManagerFactory::GetForProfile(profile_); | 777 prerender::PrerenderManagerFactory::GetForBrowserContext(profile_); |
| 778 if (prerender_manager && | 778 if (prerender_manager && |
| 779 prerender_manager->IsWebContentsPrerendering(web_contents, NULL)) | 779 prerender_manager->IsWebContentsPrerendering(web_contents, NULL)) |
| 780 action->mutable_other()->SetBoolean(constants::kActionPrerender, true); | 780 action->mutable_other()->SetBoolean(constants::kActionPrerender, true); |
| 781 for (std::set<std::string>::const_iterator it2 = it->second.begin(); | 781 for (std::set<std::string>::const_iterator it2 = it->second.begin(); |
| 782 it2 != it->second.end(); | 782 it2 != it->second.end(); |
| 783 ++it2) { | 783 ++it2) { |
| 784 action->mutable_args()->AppendString(*it2); | 784 action->mutable_args()->AppendString(*it2); |
| 785 } | 785 } |
| 786 LogAction(action); | 786 LogAction(action); |
| 787 } | 787 } |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 } | 907 } |
| 908 } | 908 } |
| 909 | 909 |
| 910 template <> | 910 template <> |
| 911 void BrowserContextKeyedAPIFactory<ActivityLog>::DeclareFactoryDependencies() { | 911 void BrowserContextKeyedAPIFactory<ActivityLog>::DeclareFactoryDependencies() { |
| 912 DependsOn(ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); | 912 DependsOn(ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); |
| 913 DependsOn(ExtensionRegistryFactory::GetInstance()); | 913 DependsOn(ExtensionRegistryFactory::GetInstance()); |
| 914 } | 914 } |
| 915 | 915 |
| 916 } // namespace extensions | 916 } // namespace extensions |
| OLD | NEW |