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

Unified Diff: chrome/browser/translate/translate_tab_helper.h

Issue 285293004: Allow browser tests to run with dynamic CLD data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cld_uma
Patch Set: Yet more #ifdefs for compiler cleanliness Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/translate/translate_tab_helper.h
diff --git a/chrome/browser/translate/translate_tab_helper.h b/chrome/browser/translate/translate_tab_helper.h
index 10fb138aa9fe6ed2565fcdc9311d6bc5d69c5b23..d497cbd57ef1bda06a964488c45fa8e0e0fc3dc5 100644
--- a/chrome/browser/translate/translate_tab_helper.h
+++ b/chrome/browser/translate/translate_tab_helper.h
@@ -26,12 +26,16 @@
namespace base {
class File;
-}
+} // namespace base
namespace content {
class BrowserContext;
class WebContents;
-}
+} // namespace content
+
+namespace test {
+class ScopedCLDDynamicDataHarness;
+} // namespace test
struct LanguageDetectionDetails;
class PrefService;
@@ -100,6 +104,7 @@ class TranslateTabHelper
private:
explicit TranslateTabHelper(content::WebContents* web_contents);
friend class content::WebContentsUserData<TranslateTabHelper>;
+ friend class test::ScopedCLDDynamicDataHarness; // For cleaning static state.
// content::WebContentsObserver implementation.
virtual void NavigationEntryCommitted(
@@ -145,9 +150,9 @@ class TranslateTabHelper
// The data file, cached as long as the process stays alive.
// We also track the offset at which the data starts, and its length.
- static base::File* s_cached_file_; // guarded by file_lock_
- static uint64 s_cached_data_offset_; // guarded by file_lock_
- static uint64 s_cached_data_length_; // guarded by file_lock_
+ static base::File* s_cached_file_; // guarded by file_lock_
+ static uint64 s_cached_data_offset_; // guarded by file_lock_
+ static uint64 s_cached_data_length_; // guarded by file_lock_
// Guards s_cached_file_
static base::LazyInstance<base::Lock> s_file_lock_;
« no previous file with comments | « chrome/browser/translate/translate_browser_test_utils.cc ('k') | chrome/browser/translate/translate_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698