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

Side by Side Diff: chrome/browser/ui/webui/options/options_ui.cc

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 #include "chrome/browser/ui/webui/options/options_ui.h" 5 #include "chrome/browser/ui/webui/options/options_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // OptionsUIHTMLSource 122 // OptionsUIHTMLSource
123 // 123 //
124 //////////////////////////////////////////////////////////////////////////////// 124 ////////////////////////////////////////////////////////////////////////////////
125 125
126 class OptionsUIHTMLSource : public content::URLDataSource { 126 class OptionsUIHTMLSource : public content::URLDataSource {
127 public: 127 public:
128 // The constructor takes over ownership of |localized_strings|. 128 // The constructor takes over ownership of |localized_strings|.
129 explicit OptionsUIHTMLSource(base::DictionaryValue* localized_strings); 129 explicit OptionsUIHTMLSource(base::DictionaryValue* localized_strings);
130 130
131 // content::URLDataSource implementation. 131 // content::URLDataSource implementation.
132 virtual std::string GetSource() const override; 132 std::string GetSource() const override;
133 virtual void StartDataRequest( 133 void StartDataRequest(
134 const std::string& path, 134 const std::string& path,
135 int render_process_id, 135 int render_process_id,
136 int render_frame_id, 136 int render_frame_id,
137 const content::URLDataSource::GotDataCallback& callback) override; 137 const content::URLDataSource::GotDataCallback& callback) override;
138 virtual std::string GetMimeType(const std::string&) const override; 138 std::string GetMimeType(const std::string&) const override;
139 virtual bool ShouldDenyXFrameOptions() const override; 139 bool ShouldDenyXFrameOptions() const override;
140 140
141 private: 141 private:
142 virtual ~OptionsUIHTMLSource(); 142 ~OptionsUIHTMLSource() override;
143 143
144 // Localized strings collection. 144 // Localized strings collection.
145 scoped_ptr<base::DictionaryValue> localized_strings_; 145 scoped_ptr<base::DictionaryValue> localized_strings_;
146 146
147 DISALLOW_COPY_AND_ASSIGN(OptionsUIHTMLSource); 147 DISALLOW_COPY_AND_ASSIGN(OptionsUIHTMLSource);
148 }; 148 };
149 149
150 OptionsUIHTMLSource::OptionsUIHTMLSource( 150 OptionsUIHTMLSource::OptionsUIHTMLSource(
151 base::DictionaryValue* localized_strings) { 151 base::DictionaryValue* localized_strings) {
152 DCHECK(localized_strings); 152 DCHECK(localized_strings);
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 // Add only if handler's service is enabled. 474 // Add only if handler's service is enabled.
475 if (handler->IsEnabled()) { 475 if (handler->IsEnabled()) {
476 // Add handler to the list and also pass the ownership. 476 // Add handler to the list and also pass the ownership.
477 web_ui()->AddMessageHandler(handler.release()); 477 web_ui()->AddMessageHandler(handler.release());
478 handler_raw->GetLocalizedValues(localized_strings); 478 handler_raw->GetLocalizedValues(localized_strings);
479 handlers_.push_back(handler_raw); 479 handlers_.push_back(handler_raw);
480 } 480 }
481 } 481 }
482 482
483 } // namespace options 483 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698