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 "chrome/browser/extensions/chrome_extension_function.h" | 8 #include "chrome/browser/extensions/chrome_extension_function.h" |
9 #include "chrome/common/extensions/api/experience_sampling_private.h" | 9 #include "chrome/common/extensions/api/experience_sampling_private.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 class BrowserContext; | 12 class BrowserContext; |
13 } | 13 } |
14 | 14 |
15 class GURL; | 15 class GURL; |
16 | 16 |
17 namespace extensions { | 17 namespace extensions { |
18 | 18 |
19 using api::experience_sampling_private::UIElement; | 19 using api::experience_sampling_private::UIElement; |
20 | 20 |
21 class ExperienceSamplingEvent { | 21 class ExperienceSamplingEvent { |
22 public: | 22 public: |
| 23 // String constants for user decision events. |
23 static const char kProceed[]; | 24 static const char kProceed[]; |
24 static const char kDeny[]; | 25 static const char kDeny[]; |
| 26 static const char kIgnore[]; |
25 static const char kCancel[]; | 27 static const char kCancel[]; |
26 static const char kReload[]; | 28 static const char kReload[]; |
27 | 29 |
| 30 // String constants for event names. |
| 31 static const char kMaliciousDownload[]; |
| 32 static const char kDangerousDownload[]; |
| 33 static const char kDownloadDangerPrompt[]; |
| 34 |
28 static scoped_ptr<ExperienceSamplingEvent> Create( | 35 static scoped_ptr<ExperienceSamplingEvent> Create( |
29 const std::string& element_name, | 36 const std::string& element_name, |
30 const GURL& destination, | 37 const GURL& destination, |
31 const GURL& referrer); | 38 const GURL& referrer); |
32 | 39 |
33 static scoped_ptr<ExperienceSamplingEvent> Create( | 40 static scoped_ptr<ExperienceSamplingEvent> Create( |
34 const std::string& element_name); | 41 const std::string& element_name); |
35 | 42 |
36 ExperienceSamplingEvent(const std::string& element_name, | 43 ExperienceSamplingEvent(const std::string& element_name, |
37 const GURL& destination, | 44 const GURL& destination, |
(...skipping 16 matching lines...) Expand all Loading... |
54 bool has_viewed_learn_more_; | 61 bool has_viewed_learn_more_; |
55 content::BrowserContext* browser_context_; | 62 content::BrowserContext* browser_context_; |
56 UIElement ui_element_; | 63 UIElement ui_element_; |
57 | 64 |
58 DISALLOW_COPY_AND_ASSIGN(ExperienceSamplingEvent); | 65 DISALLOW_COPY_AND_ASSIGN(ExperienceSamplingEvent); |
59 }; | 66 }; |
60 | 67 |
61 } // namespace extensions | 68 } // namespace extensions |
62 | 69 |
63 #endif // CHROME_BROWSER_EXTENSIONS_API_EXPERIENCE_SAMPLING_PRIVATE_EXPERIENCE_
SAMPLING_H_ | 70 #endif // CHROME_BROWSER_EXTENSIONS_API_EXPERIENCE_SAMPLING_PRIVATE_EXPERIENCE_
SAMPLING_H_ |
OLD | NEW |