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/common/extensions/api/experience_sampling_private.h" | 8 #include "chrome/common/extensions/api/experience_sampling_private.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
11 class BrowserContext; | 11 class BrowserContext; |
12 } | 12 } |
13 | 13 |
14 class GURL; | 14 class GURL; |
15 | 15 |
16 namespace extensions { | 16 namespace extensions { |
17 | 17 |
18 using api::experience_sampling_private::UIElement; | 18 using api::experience_sampling_private::UIElement; |
19 | 19 |
20 class ExperienceSamplingEvent { | 20 class ExperienceSamplingEvent { |
21 public: | 21 public: |
22 // String constants for user decision events. | 22 // String constants for user decision events. |
23 static const char kProceed[]; | 23 static const char kProceed[]; |
24 static const char kDeny[]; | 24 static const char kDeny[]; |
| 25 static const char kIgnore[]; |
25 static const char kCancel[]; | 26 static const char kCancel[]; |
26 static const char kReload[]; | 27 static const char kReload[]; |
27 | 28 |
28 // String constants for event names. | 29 // String constants for event names. |
| 30 static const char kMaliciousDownload[]; |
| 31 static const char kDangerousDownload[]; |
| 32 static const char kDownloadDangerPrompt[]; |
29 static const char kExtensionInstallDialog[]; | 33 static const char kExtensionInstallDialog[]; |
30 | 34 |
31 // The Create() functions can return an empty scoped_ptr if they cannot find | 35 // The Create() functions can return an empty scoped_ptr if they cannot find |
32 // the BrowserContext. Code using them should check the scoped pointer using | 36 // the BrowserContext. Code using them should check the scoped pointer using |
33 // scoped_ptr::get(). | 37 // scoped_ptr::get(). |
34 static scoped_ptr<ExperienceSamplingEvent> Create( | 38 static scoped_ptr<ExperienceSamplingEvent> Create( |
35 const std::string& element_name, | 39 const std::string& element_name, |
36 const GURL& destination, | 40 const GURL& destination, |
37 const GURL& referrer); | 41 const GURL& referrer); |
38 | 42 |
(...skipping 24 matching lines...) Expand all Loading... |
63 bool has_viewed_learn_more_; | 67 bool has_viewed_learn_more_; |
64 content::BrowserContext* browser_context_; | 68 content::BrowserContext* browser_context_; |
65 UIElement ui_element_; | 69 UIElement ui_element_; |
66 | 70 |
67 DISALLOW_COPY_AND_ASSIGN(ExperienceSamplingEvent); | 71 DISALLOW_COPY_AND_ASSIGN(ExperienceSamplingEvent); |
68 }; | 72 }; |
69 | 73 |
70 } // namespace extensions | 74 } // namespace extensions |
71 | 75 |
72 #endif // CHROME_BROWSER_EXTENSIONS_API_EXPERIENCE_SAMPLING_PRIVATE_EXPERIENCE_
SAMPLING_H_ | 76 #endif // CHROME_BROWSER_EXTENSIONS_API_EXPERIENCE_SAMPLING_PRIVATE_EXPERIENCE_
SAMPLING_H_ |
OLD | NEW |