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

Side by Side Diff: chrome/browser/download/download_util.h

Issue 22640018: Set up Finch trial for malware download warnings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: string16 to base string 16 Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Download utilities. 5 // Download utilities.
6 6
7 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_ 7 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_
8 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_ 8 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
16 #include "base/strings/string_util.h"
16 #include "ui/gfx/native_widget_types.h" 17 #include "ui/gfx/native_widget_types.h"
17 18
18 #if defined(TOOLKIT_VIEWS) 19 #if defined(TOOLKIT_VIEWS)
19 #include "ui/views/view.h" 20 #include "ui/views/view.h"
20 #endif 21 #endif
21 22
22 class GURL; 23 class GURL;
23 24
24 namespace base { 25 namespace base {
25 class DictionaryValue; 26 class DictionaryValue;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 109
109 CHROME_DOWNLOAD_SOURCE_LAST_ENTRY, 110 CHROME_DOWNLOAD_SOURCE_LAST_ENTRY,
110 }; 111 };
111 112
112 // Increment one of the above counts. 113 // Increment one of the above counts.
113 void RecordDownloadCount(ChromeDownloadCountTypes type); 114 void RecordDownloadCount(ChromeDownloadCountTypes type);
114 115
115 // Record initiation of a download from a specific source. 116 // Record initiation of a download from a specific source.
116 void RecordDownloadSource(ChromeDownloadSource source); 117 void RecordDownloadSource(ChromeDownloadSource source);
117 118
119 // Summer/Fall 2013 Finch experiment strings -----------------------------------
120 // Only deployed to English speakers, don't need translation.
121
122 // Study and condition names.
123 extern const char kFinchTrialName[];
124 extern const char kCondition1Control[];
125 extern const char kCondition2Control[];
126 extern const char kCondition3Malicious[];
127 extern const char kCondition4Unsafe[];
128 extern const char kCondition5Dangerous[];
129 extern const char kCondition6Harmful[];
130 extern const char kCondition7DiscardSecond[];
131 extern const char kCondition8DiscardFirst[];
132 extern const char kCondition9SafeDiscard[];
133 extern const char kCondition10SafeDontRun[];
134
135 // Helper for getting the appropriate message for a Finch trial.
136 // You should only invoke this if you believe you're in the kFinchTrialName
137 // finch trial; if you aren't, use the default string and don't invoke this.
138 base::string16 AssembleMalwareFinchString(const std::string& trial_condition,
139 const string16& elided_filename);
Dan Beam 2013/08/09 23:24:51 nit: indent off, base::string16
felt 2013/08/09 23:48:34 Done.
140
118 } // namespace download_util 141 } // namespace download_util
119 142
120 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_ 143 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698