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

Side by Side Diff: content/public/browser/download_item.h

Issue 2029903002: Add token field to ClientSafeBrowsingReportReqeust (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweak comments Created 4 years, 6 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 (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 // Each download is represented by a DownloadItem, and all DownloadItems 5 // Each download is represented by a DownloadItem, and all DownloadItems
6 // are owned by the DownloadManager which maintains a global list of all 6 // are owned by the DownloadManager which maintains a global list of all
7 // downloads. DownloadItems are created when a user initiates a download, 7 // downloads. DownloadItems are created when a user initiates a download,
8 // and exist for the duration of the browser life time. 8 // and exist for the duration of the browser life time.
9 // 9 //
10 // Download observers: 10 // Download observers:
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 virtual BrowserContext* GetBrowserContext() const = 0; 316 virtual BrowserContext* GetBrowserContext() const = 0;
317 virtual WebContents* GetWebContents() const = 0; 317 virtual WebContents* GetWebContents() const = 0;
318 318
319 // External state transitions/setters ---------------------------------------- 319 // External state transitions/setters ----------------------------------------
320 // TODO(rdsmith): These should all be removed; the download item should 320 // TODO(rdsmith): These should all be removed; the download item should
321 // control its own state transitions. 321 // control its own state transitions.
322 322
323 // Called if a check of the download contents was performed and the results of 323 // Called if a check of the download contents was performed and the results of
324 // the test are available. This should only be called after AllDataSaved() is 324 // the test are available. This should only be called after AllDataSaved() is
325 // true. 325 // true.
326 virtual void OnContentCheckCompleted(DownloadDangerType danger_type) = 0; 326 virtual void OnContentCheckCompleted(DownloadDangerType danger_type,
327 const std::string& token) = 0;
327 328
328 // Mark the download to be auto-opened when completed. 329 // Mark the download to be auto-opened when completed.
329 virtual void SetOpenWhenComplete(bool open) = 0; 330 virtual void SetOpenWhenComplete(bool open) = 0;
330 331
331 // Mark the download as temporary (not visible in persisted store or 332 // Mark the download as temporary (not visible in persisted store or
332 // SearchDownloads(), removed from main UI upon completion). 333 // SearchDownloads(), removed from main UI upon completion).
333 virtual void SetIsTemporary(bool temporary) = 0; 334 virtual void SetIsTemporary(bool temporary) = 0;
334 335
335 // Mark the download as having been opened (without actually opening it). 336 // Mark the download as having been opened (without actually opening it).
336 virtual void SetOpened(bool opened) = 0; 337 virtual void SetOpened(bool opened) = 0;
337 338
338 // Set a display name for the download that will be independent of the target 339 // Set a display name for the download that will be independent of the target
339 // filename. If |name| is not empty, then GetFileNameToReportUser() will 340 // filename. If |name| is not empty, then GetFileNameToReportUser() will
340 // return |name|. Has no effect on the final target filename. 341 // return |name|. Has no effect on the final target filename.
341 virtual void SetDisplayName(const base::FilePath& name) = 0; 342 virtual void SetDisplayName(const base::FilePath& name) = 0;
342 343
344 // Get token from ClientDownloadResponse.
345 virtual std::string GetDownloadPingToken() const = 0;
346
343 // Debug/testing ------------------------------------------------------------- 347 // Debug/testing -------------------------------------------------------------
344 virtual std::string DebugString(bool verbose) const = 0; 348 virtual std::string DebugString(bool verbose) const = 0;
345 }; 349 };
346 350
347 } // namespace content 351 } // namespace content
348 352
349 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ITEM_H_ 353 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ITEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698