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

Unified Diff: chrome/browser/profile_impl.cc

Issue 5023001: Handful of related instant changes: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix linux build Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/profile_impl.h ('k') | chrome/browser/search_engines/template_url_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profile_impl.cc
diff --git a/chrome/browser/profile_impl.cc b/chrome/browser/profile_impl.cc
index 745b4b9bab337bf627a6fed3743fccaad69f5282..02f1a2e6bbf6f95343ee5916e3ddd2a8aba9c73c 100644
--- a/chrome/browser/profile_impl.cc
+++ b/chrome/browser/profile_impl.cc
@@ -46,6 +46,7 @@
#include "chrome/browser/history/top_sites.h"
#include "chrome/browser/host_content_settings_map.h"
#include "chrome/browser/host_zoom_map.h"
+#include "chrome/browser/instant/instant_controller.h"
#include "chrome/browser/in_process_webkit/webkit_context.h"
#include "chrome/browser/net/chrome_url_request_context.h"
#include "chrome/browser/net/gaia/token_service.h"
@@ -92,7 +93,9 @@
#endif
#if defined(OS_WIN)
+#include "chrome/browser/instant/promo_counter.h"
#include "chrome/browser/password_manager/password_store_win.h"
+#include "chrome/installer/util/install_util.h"
#elif defined(OS_MACOSX)
#include "chrome/browser/keychain_mac.h"
#include "chrome/browser/password_manager/password_store_mac.h"
@@ -255,6 +258,9 @@ ProfileImpl::ProfileImpl(const FilePath& path)
start_time_(Time::Now()),
spellcheck_host_(NULL),
spellcheck_host_ready_(false),
+#if defined(OS_WIN)
+ checked_instant_promo_(false),
+#endif
shutdown_session_service_(false) {
DCHECK(!path.empty()) << "Using an empty path will attempt to write " <<
"profile files to the root directory!";
@@ -348,6 +354,8 @@ ProfileImpl::ProfileImpl(const FilePath& path)
// Log the profile size after a reasonable startup delay.
BrowserThread::PostDelayedTask(BrowserThread::FILE, FROM_HERE,
new ProfileSizeTask(path_), 112000);
+
+ InstantController::RecordMetrics(this);
}
void ProfileImpl::InitExtensions() {
@@ -1303,6 +1311,28 @@ ExtensionInfoMap* ProfileImpl::GetExtensionInfoMap() {
return extension_info_map_.get();
}
+PromoCounter* ProfileImpl::GetInstantPromoCounter() {
+#if defined(OS_WIN)
+ // TODO: enable this when we're ready to turn on the promo.
+ /*
+ if (!checked_instant_promo_) {
+ checked_instant_promo_ = true;
+ PrefService* prefs = GetPrefs();
+ if (!prefs->GetBoolean(prefs::kInstantEnabledOnce) &&
+ !InstantController::IsEnabled(this) &&
+ InstallUtil::IsChromeSxSProcess()) {
+ DCHECK(!instant_promo_counter_.get());
+ instant_promo_counter_.reset(
+ new PromoCounter(this, prefs::kInstantPromo, "Instant.Promo", 3, 3));
+ }
+ }
+ */
+ return instant_promo_counter_.get();
+#else
+ return NULL;
+#endif
+}
+
#if defined(OS_CHROMEOS)
chromeos::ProxyConfigServiceImpl*
ProfileImpl::GetChromeOSProxyConfigServiceImpl() {
« no previous file with comments | « chrome/browser/profile_impl.h ('k') | chrome/browser/search_engines/template_url_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698