| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This class gathers state related to a single user profile. | 5 // This class gathers state related to a single user profile. |
| 6 | 6 |
| 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_H_ | 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_H_ |
| 8 #define CHROME_BROWSER_PROFILES_PROFILE_H_ | 8 #define CHROME_BROWSER_PROFILES_PROFILE_H_ |
| 9 #pragma once | 9 #pragma once |
| 10 | 10 |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 return 0 == accessibility_pause_level_; | 555 return 0 == accessibility_pause_level_; |
| 556 } | 556 } |
| 557 | 557 |
| 558 // Checks whether sync is configurable by the user. Returns false if sync is | 558 // Checks whether sync is configurable by the user. Returns false if sync is |
| 559 // disabled or controlled by configuration management. | 559 // disabled or controlled by configuration management. |
| 560 bool IsSyncAccessible(); | 560 bool IsSyncAccessible(); |
| 561 | 561 |
| 562 // Creates an OffTheRecordProfile which points to this Profile. | 562 // Creates an OffTheRecordProfile which points to this Profile. |
| 563 Profile* CreateOffTheRecordProfile(); | 563 Profile* CreateOffTheRecordProfile(); |
| 564 | 564 |
| 565 // Returns the total number of downloads associated with this profile |
| 566 // (not including downloads associated with any OffTheRecordProfile |
| 567 // associated with this profile). |
| 568 int DownloadCount(); |
| 569 |
| 565 protected: | 570 protected: |
| 566 friend class OffTheRecordProfileImpl; | 571 friend class OffTheRecordProfileImpl; |
| 567 | 572 |
| 568 static net::URLRequestContextGetter* default_request_context_; | 573 static net::URLRequestContextGetter* default_request_context_; |
| 569 | 574 |
| 570 private: | 575 private: |
| 571 bool restored_last_session_; | 576 bool restored_last_session_; |
| 572 | 577 |
| 573 // Accessibility events will only be propagated when the pause | 578 // Accessibility events will only be propagated when the pause |
| 574 // level is zero. PauseAccessibilityEvents and ResumeAccessibilityEvents | 579 // level is zero. PauseAccessibilityEvents and ResumeAccessibilityEvents |
| 575 // increment and decrement the level, respectively, rather than set it to | 580 // increment and decrement the level, respectively, rather than set it to |
| 576 // true or false, so that calls can be nested. | 581 // true or false, so that calls can be nested. |
| 577 int accessibility_pause_level_; | 582 int accessibility_pause_level_; |
| 578 }; | 583 }; |
| 579 | 584 |
| 580 #if defined(COMPILER_GCC) | 585 #if defined(COMPILER_GCC) |
| 581 namespace __gnu_cxx { | 586 namespace __gnu_cxx { |
| 582 | 587 |
| 583 template<> | 588 template<> |
| 584 struct hash<Profile*> { | 589 struct hash<Profile*> { |
| 585 std::size_t operator()(Profile* const& p) const { | 590 std::size_t operator()(Profile* const& p) const { |
| 586 return reinterpret_cast<std::size_t>(p); | 591 return reinterpret_cast<std::size_t>(p); |
| 587 } | 592 } |
| 588 }; | 593 }; |
| 589 | 594 |
| 590 } // namespace __gnu_cxx | 595 } // namespace __gnu_cxx |
| 591 #endif | 596 #endif |
| 592 | 597 |
| 593 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ | 598 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ |
| OLD | NEW |