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

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

Issue 2321083002: [NoStatePrefetch] Add performance histograms. (Closed)
Patch Set: Review comments Created 4 years, 3 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) 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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/extensions/activity_log/activity_log_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698