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

Side by Side Diff: components/translate/core/browser/language_state.cc

Issue 378253002: Fix translate namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "components/translate/core/browser/language_state.h" 5 #include "components/translate/core/browser/language_state.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "components/translate/core/browser/translate_driver.h" 8 #include "components/translate/core/browser/translate_driver.h"
9 9
10 namespace translate {
11
10 LanguageState::LanguageState(TranslateDriver* driver) 12 LanguageState::LanguageState(TranslateDriver* driver)
11 : is_page_translated_(false), 13 : is_page_translated_(false),
12 translate_driver_(driver), 14 translate_driver_(driver),
13 page_needs_translation_(false), 15 page_needs_translation_(false),
14 translation_pending_(false), 16 translation_pending_(false),
15 translation_declined_(false), 17 translation_declined_(false),
16 in_page_navigation_(false), 18 in_page_navigation_(false),
17 translate_enabled_(false) { 19 translate_enabled_(false) {
18 DCHECK(translate_driver_); 20 DCHECK(translate_driver_);
19 } 21 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 if (is_page_translated_ == value) 105 if (is_page_translated_ == value)
104 return; 106 return;
105 107
106 is_page_translated_ = value; 108 is_page_translated_ = value;
107 translate_driver_->OnIsPageTranslatedChanged(); 109 translate_driver_->OnIsPageTranslatedChanged();
108 110
109 // With the translation done, the translate feature must be enabled. 111 // With the translation done, the translate feature must be enabled.
110 if (is_page_translated_) 112 if (is_page_translated_)
111 SetTranslateEnabled(true); 113 SetTranslateEnabled(true);
112 } 114 }
115
116 } // namespace translate
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698