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 // This code glues the RLZ library DLL with Chrome. It allows Chrome to work | 5 // This code glues the RLZ library DLL with Chrome. It allows Chrome to work |
6 // with or without the DLL being present. If the DLL is not present the | 6 // with or without the DLL being present. If the DLL is not present the |
7 // functions do nothing and just return false. | 7 // functions do nothing and just return false. |
8 | 8 |
9 #include "chrome/browser/rlz/rlz.h" | 9 #include "chrome/browser/rlz/rlz.h" |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "chrome/browser/search_engines/template_url_service.h" | 28 #include "chrome/browser/search_engines/template_url_service.h" |
29 #include "chrome/browser/search_engines/template_url_service_factory.h" | 29 #include "chrome/browser/search_engines/template_url_service_factory.h" |
30 #include "chrome/common/chrome_notification_types.h" | 30 #include "chrome/common/chrome_notification_types.h" |
31 #include "chrome/common/chrome_paths.h" | 31 #include "chrome/common/chrome_paths.h" |
32 #include "chrome/common/env_vars.h" | 32 #include "chrome/common/env_vars.h" |
33 #include "chrome/installer/util/google_update_settings.h" | 33 #include "chrome/installer/util/google_update_settings.h" |
34 #include "content/browser/tab_contents/navigation_entry.h" | 34 #include "content/browser/tab_contents/navigation_entry.h" |
35 #include "content/public/browser/browser_thread.h" | 35 #include "content/public/browser/browser_thread.h" |
36 #include "content/public/browser/notification_service.h" | 36 #include "content/public/browser/notification_service.h" |
37 | 37 |
| 38 using content::BrowserThread; |
| 39 |
38 namespace { | 40 namespace { |
39 | 41 |
40 void RecordProductEvents(bool first_run, bool google_default_search, | 42 void RecordProductEvents(bool first_run, bool google_default_search, |
41 bool google_default_homepage, bool already_ran, | 43 bool google_default_homepage, bool already_ran, |
42 bool omnibox_used, bool homepage_used) { | 44 bool omnibox_used, bool homepage_used) { |
43 // Record the installation of chrome. We call this all the time but the rlz | 45 // Record the installation of chrome. We call this all the time but the rlz |
44 // lib should ingore all but the first one. | 46 // lib should ingore all but the first one. |
45 rlz_lib::RecordProductEvent(rlz_lib::CHROME, | 47 rlz_lib::RecordProductEvent(rlz_lib::CHROME, |
46 rlz_lib::CHROME_OMNIBOX, | 48 rlz_lib::CHROME_OMNIBOX, |
47 rlz_lib::INSTALL); | 49 rlz_lib::INSTALL); |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 BrowserThread::FILE, FROM_HERE, | 393 BrowserThread::FILE, FROM_HERE, |
392 NewRunnableFunction(&RLZTracker::GetAccessPointRlz, point, not_used)); | 394 NewRunnableFunction(&RLZTracker::GetAccessPointRlz, point, not_used)); |
393 return true; | 395 return true; |
394 } | 396 } |
395 | 397 |
396 // static | 398 // static |
397 void RLZTracker::CleanupRlz() { | 399 void RLZTracker::CleanupRlz() { |
398 GetInstance()->rlz_cache_.clear(); | 400 GetInstance()->rlz_cache_.clear(); |
399 GetInstance()->registrar_.RemoveAll(); | 401 GetInstance()->registrar_.RemoveAll(); |
400 } | 402 } |
OLD | NEW |