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

Side by Side Diff: chrome/browser/ui/webui/extensions/extension_loader_handler.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 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 "chrome/browser/ui/webui/extensions/extension_loader_handler.h" 5 #include "chrome/browser/ui/webui/extensions/extension_loader_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 base::ReadFileToString(path, &data); 44 base::ReadFileToString(path, &data);
45 return data; 45 return data;
46 } 46 }
47 47
48 } // namespace 48 } // namespace
49 49
50 class ExtensionLoaderHandler::FileHelper 50 class ExtensionLoaderHandler::FileHelper
51 : public ui::SelectFileDialog::Listener { 51 : public ui::SelectFileDialog::Listener {
52 public: 52 public:
53 explicit FileHelper(ExtensionLoaderHandler* loader_handler); 53 explicit FileHelper(ExtensionLoaderHandler* loader_handler);
54 virtual ~FileHelper(); 54 ~FileHelper() override;
55 55
56 // Create a FileDialog for the user to select the unpacked extension 56 // Create a FileDialog for the user to select the unpacked extension
57 // directory. 57 // directory.
58 void ChooseFile(); 58 void ChooseFile();
59 59
60 private: 60 private:
61 // ui::SelectFileDialog::Listener implementation. 61 // ui::SelectFileDialog::Listener implementation.
62 virtual void FileSelected(const base::FilePath& path, 62 void FileSelected(const base::FilePath& path,
63 int index, 63 int index,
64 void* params) override; 64 void* params) override;
65 virtual void MultiFilesSelected( 65 void MultiFilesSelected(const std::vector<base::FilePath>& files,
66 const std::vector<base::FilePath>& files, void* params) override; 66 void* params) override;
67 67
68 // The associated ExtensionLoaderHandler. Weak, but guaranteed to be alive, 68 // The associated ExtensionLoaderHandler. Weak, but guaranteed to be alive,
69 // as it owns this object. 69 // as it owns this object.
70 ExtensionLoaderHandler* loader_handler_; 70 ExtensionLoaderHandler* loader_handler_;
71 71
72 // The dialog used to pick a directory when loading an unpacked extension. 72 // The dialog used to pick a directory when loading an unpacked extension.
73 scoped_refptr<ui::SelectFileDialog> load_extension_dialog_; 73 scoped_refptr<ui::SelectFileDialog> load_extension_dialog_;
74 74
75 // The last selected directory, so we can start in the same spot. 75 // The last selected directory, so we can start in the same spot.
76 base::FilePath last_unpacked_directory_; 76 base::FilePath last_unpacked_directory_;
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 } 314 }
315 315
316 void ExtensionLoaderHandler::NotifyFrontendOfFailure() { 316 void ExtensionLoaderHandler::NotifyFrontendOfFailure() {
317 web_ui()->CallJavascriptFunction( 317 web_ui()->CallJavascriptFunction(
318 "extensions.ExtensionLoader.notifyLoadFailed", 318 "extensions.ExtensionLoader.notifyLoadFailed",
319 failures_); 319 failures_);
320 failures_.Clear(); 320 failures_.Clear();
321 } 321 }
322 322
323 } // namespace extensions 323 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698