| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_EXPERIENCE_SAMPLING_PRIVATE_EXPERIENCE_SAM
PLING_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_EXPERIENCE_SAMPLING_PRIVATE_EXPERIENCE_SAM
PLING_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_EXPERIENCE_SAMPLING_PRIVATE_EXPERIENCE_SAM
PLING_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_EXPERIENCE_SAMPLING_PRIVATE_EXPERIENCE_SAM
PLING_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "chrome/common/extensions/api/experience_sampling_private.h" | 9 #include "chrome/common/extensions/api/experience_sampling_private.h" |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 // String constants for event names. | 30 // String constants for event names. |
| 31 static const char kMaliciousDownload[]; | 31 static const char kMaliciousDownload[]; |
| 32 static const char kDangerousDownload[]; | 32 static const char kDangerousDownload[]; |
| 33 static const char kDownloadDangerPrompt[]; | 33 static const char kDownloadDangerPrompt[]; |
| 34 static const char kExtensionInstallDialog[]; | 34 static const char kExtensionInstallDialog[]; |
| 35 | 35 |
| 36 // The Create() functions can return an empty scoped_ptr if they cannot find | 36 // The Create() functions can return an empty scoped_ptr if they cannot find |
| 37 // the BrowserContext. Code using them should check the scoped pointer using | 37 // the BrowserContext. Code using them should check the scoped pointer using |
| 38 // scoped_ptr::get(). | 38 // scoped_ptr::get(). |
| 39 static scoped_ptr<ExperienceSamplingEvent> Create( | 39 static std::unique_ptr<ExperienceSamplingEvent> Create( |
| 40 const std::string& element_name, | 40 const std::string& element_name, |
| 41 const GURL& destination, | 41 const GURL& destination, |
| 42 const GURL& referrer); | 42 const GURL& referrer); |
| 43 | 43 |
| 44 static scoped_ptr<ExperienceSamplingEvent> Create( | 44 static std::unique_ptr<ExperienceSamplingEvent> Create( |
| 45 const std::string& element_name); | 45 const std::string& element_name); |
| 46 | 46 |
| 47 ExperienceSamplingEvent(const std::string& element_name, | 47 ExperienceSamplingEvent(const std::string& element_name, |
| 48 const GURL& destination, | 48 const GURL& destination, |
| 49 const GURL& referrer, | 49 const GURL& referrer, |
| 50 content::BrowserContext* browser_context); | 50 content::BrowserContext* browser_context); |
| 51 ~ExperienceSamplingEvent(); | 51 ~ExperienceSamplingEvent(); |
| 52 | 52 |
| 53 // Sends an extension API event for the user seeing this event. | 53 // Sends an extension API event for the user seeing this event. |
| 54 void CreateOnDisplayedEvent(); | 54 void CreateOnDisplayedEvent(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 68 bool has_viewed_learn_more_; | 68 bool has_viewed_learn_more_; |
| 69 content::BrowserContext* browser_context_; | 69 content::BrowserContext* browser_context_; |
| 70 UIElement ui_element_; | 70 UIElement ui_element_; |
| 71 | 71 |
| 72 DISALLOW_COPY_AND_ASSIGN(ExperienceSamplingEvent); | 72 DISALLOW_COPY_AND_ASSIGN(ExperienceSamplingEvent); |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 } // namespace extensions | 75 } // namespace extensions |
| 76 | 76 |
| 77 #endif // CHROME_BROWSER_EXTENSIONS_API_EXPERIENCE_SAMPLING_PRIVATE_EXPERIENCE_
SAMPLING_H_ | 77 #endif // CHROME_BROWSER_EXTENSIONS_API_EXPERIENCE_SAMPLING_PRIVATE_EXPERIENCE_
SAMPLING_H_ |
| OLD | NEW |