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

Side by Side Diff: content/browser/download/download_item_impl.h

Issue 10805020: Kill DownloadItem::IsOtr() (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: . Created 8 years, 5 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 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 26 matching lines...) Expand all
37 DownloadItemImpl(DownloadItemImplDelegate* delegate, 37 DownloadItemImpl(DownloadItemImplDelegate* delegate,
38 content::DownloadId download_id, 38 content::DownloadId download_id,
39 const content::DownloadPersistentStoreInfo& info, 39 const content::DownloadPersistentStoreInfo& info,
40 const net::BoundNetLog& bound_net_log); 40 const net::BoundNetLog& bound_net_log);
41 41
42 // Constructing for a regular download. 42 // Constructing for a regular download.
43 // |bound_net_log| is constructed externally for our use. 43 // |bound_net_log| is constructed externally for our use.
44 DownloadItemImpl(DownloadItemImplDelegate* delegate, 44 DownloadItemImpl(DownloadItemImplDelegate* delegate,
45 const DownloadCreateInfo& info, 45 const DownloadCreateInfo& info,
46 scoped_ptr<DownloadRequestHandleInterface> request_handle, 46 scoped_ptr<DownloadRequestHandleInterface> request_handle,
47 bool is_otr,
48 const net::BoundNetLog& bound_net_log); 47 const net::BoundNetLog& bound_net_log);
49 48
50 // Constructing for the "Save Page As..." feature: 49 // Constructing for the "Save Page As..." feature:
51 // |bound_net_log| is constructed externally for our use. 50 // |bound_net_log| is constructed externally for our use.
52 DownloadItemImpl(DownloadItemImplDelegate* delegate, 51 DownloadItemImpl(DownloadItemImplDelegate* delegate,
53 const FilePath& path, 52 const FilePath& path,
54 const GURL& url, 53 const GURL& url,
55 bool is_otr,
56 content::DownloadId download_id, 54 content::DownloadId download_id,
57 const std::string& mime_type, 55 const std::string& mime_type,
58 const net::BoundNetLog& bound_net_log); 56 const net::BoundNetLog& bound_net_log);
59 57
60 virtual ~DownloadItemImpl(); 58 virtual ~DownloadItemImpl();
61 59
62 // Implementation functions (not part of the DownloadItem interface). 60 // Implementation functions (not part of the DownloadItem interface).
63 61
64 // Indicate that an error has occurred on the download. 62 // Indicate that an error has occurred on the download.
65 virtual void Interrupt(content::DownloadInterruptReason reason); 63 virtual void Interrupt(content::DownloadInterruptReason reason);
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 virtual void SetOpenWhenComplete(bool open) OVERRIDE; 165 virtual void SetOpenWhenComplete(bool open) OVERRIDE;
168 virtual bool GetFileExternallyRemoved() const OVERRIDE; 166 virtual bool GetFileExternallyRemoved() const OVERRIDE;
169 virtual SafetyState GetSafetyState() const OVERRIDE; 167 virtual SafetyState GetSafetyState() const OVERRIDE;
170 virtual content::DownloadDangerType GetDangerType() const OVERRIDE; 168 virtual content::DownloadDangerType GetDangerType() const OVERRIDE;
171 virtual bool IsDangerous() const OVERRIDE; 169 virtual bool IsDangerous() const OVERRIDE;
172 virtual bool GetAutoOpened() OVERRIDE; 170 virtual bool GetAutoOpened() OVERRIDE;
173 virtual FilePath GetTargetName() const OVERRIDE; 171 virtual FilePath GetTargetName() const OVERRIDE;
174 virtual const FilePath& GetForcedFilePath() const OVERRIDE; 172 virtual const FilePath& GetForcedFilePath() const OVERRIDE;
175 virtual bool HasUserGesture() const OVERRIDE; 173 virtual bool HasUserGesture() const OVERRIDE;
176 virtual content::PageTransition GetTransitionType() const OVERRIDE; 174 virtual content::PageTransition GetTransitionType() const OVERRIDE;
177 virtual bool IsOtr() const OVERRIDE;
178 virtual bool IsTemporary() const OVERRIDE; 175 virtual bool IsTemporary() const OVERRIDE;
179 virtual void SetIsTemporary(bool temporary) OVERRIDE; 176 virtual void SetIsTemporary(bool temporary) OVERRIDE;
180 virtual void SetOpened(bool opened) OVERRIDE; 177 virtual void SetOpened(bool opened) OVERRIDE;
181 virtual bool GetOpened() const OVERRIDE; 178 virtual bool GetOpened() const OVERRIDE;
182 virtual const std::string& GetLastModifiedTime() const OVERRIDE; 179 virtual const std::string& GetLastModifiedTime() const OVERRIDE;
183 virtual const std::string& GetETag() const OVERRIDE; 180 virtual const std::string& GetETag() const OVERRIDE;
184 virtual content::DownloadInterruptReason GetLastReason() const OVERRIDE; 181 virtual content::DownloadInterruptReason GetLastReason() const OVERRIDE;
185 virtual content::DownloadPersistentStoreInfo 182 virtual content::DownloadPersistentStoreInfo
186 GetPersistentStoreInfo() const OVERRIDE; 183 GetPersistentStoreInfo() const OVERRIDE;
187 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; 184 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE;
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 // (executable files are typically considered dangerous). 370 // (executable files are typically considered dangerous).
374 SafetyState safety_state_; 371 SafetyState safety_state_;
375 372
376 // True if the download was auto-opened. We set this rather than using 373 // True if the download was auto-opened. We set this rather than using
377 // an observer as it's frequently possible for the download to be auto opened 374 // an observer as it's frequently possible for the download to be auto opened
378 // before the observer is added. 375 // before the observer is added.
379 bool auto_opened_; 376 bool auto_opened_;
380 377
381 bool is_persisted_; 378 bool is_persisted_;
382 379
383 // True if the download was initiated in an incognito window.
384 bool is_otr_;
385
386 // True if the item was downloaded temporarily. 380 // True if the item was downloaded temporarily.
387 bool is_temporary_; 381 bool is_temporary_;
388 382
389 // True if we've saved all the data for the download. 383 // True if we've saved all the data for the download.
390 bool all_data_saved_; 384 bool all_data_saved_;
391 385
392 // Did the user open the item either directly or indirectly (such as by 386 // Did the user open the item either directly or indirectly (such as by
393 // setting always open files of this type)? The shelf also sets this field 387 // setting always open files of this type)? The shelf also sets this field
394 // when the user closes the shelf before the item has been opened but should 388 // when the user closes the shelf before the item has been opened but should
395 // be treated as though the user opened it. 389 // be treated as though the user opened it.
(...skipping 11 matching lines...) Expand all
407 401
408 // Net log to use for this download. 402 // Net log to use for this download.
409 const net::BoundNetLog bound_net_log_; 403 const net::BoundNetLog bound_net_log_;
410 404
411 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; 405 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_;
412 406
413 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); 407 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl);
414 }; 408 };
415 409
416 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ 410 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698