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

Side by Side Diff: chrome/browser/extensions/api/experience_sampling_private/experience_sampling.h

Issue 402293002: Experience sampling instrumentation for dangerous downloads warnings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sampling-api
Patch Set: Address reviewer comments Created 6 years, 4 months 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 unified diff | Download patch
OLDNEW
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 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[];
28 static const char kEventNameMaliciousDownload[];
msw 2014/08/14 01:48:33 nit: Maybe add a blank line between these and the
Chris Thompson 2014/08/14 15:43:44 Done.
29 static const char kEventNameDangerousDownload[];
27 30
28 static scoped_ptr<ExperienceSamplingEvent> Create( 31 static scoped_ptr<ExperienceSamplingEvent> Create(
29 const std::string& element_name, 32 const std::string& element_name,
30 const GURL& destination, 33 const GURL& destination,
31 const GURL& referrer); 34 const GURL& referrer);
32 35
33 static scoped_ptr<ExperienceSamplingEvent> Create( 36 static scoped_ptr<ExperienceSamplingEvent> Create(
34 const std::string& element_name); 37 const std::string& element_name);
35 38
36 ExperienceSamplingEvent(const std::string& element_name, 39 ExperienceSamplingEvent(const std::string& element_name,
(...skipping 17 matching lines...) Expand all
54 bool has_viewed_learn_more_; 57 bool has_viewed_learn_more_;
55 content::BrowserContext* browser_context_; 58 content::BrowserContext* browser_context_;
56 UIElement ui_element_; 59 UIElement ui_element_;
57 60
58 DISALLOW_COPY_AND_ASSIGN(ExperienceSamplingEvent); 61 DISALLOW_COPY_AND_ASSIGN(ExperienceSamplingEvent);
59 }; 62 };
60 63
61 } // namespace extensions 64 } // namespace extensions
62 65
63 #endif // CHROME_BROWSER_EXTENSIONS_API_EXPERIENCE_SAMPLING_PRIVATE_EXPERIENCE_ SAMPLING_H_ 66 #endif // CHROME_BROWSER_EXTENSIONS_API_EXPERIENCE_SAMPLING_PRIVATE_EXPERIENCE_ SAMPLING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698