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

Side by Side Diff: chrome/browser/ui/views/extensions/request_file_system_dialog_view.cc

Issue 2855663002: Fix the memory leak in the RequestFileSystemDialogTest reported by the Chrome OS ASAN builder. (Closed)
Patch Set: Remove the unused contents_view_ member from the RequestFileSystemDialogView class as it is no long… Created 3 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/views/extensions/request_file_system_dialog_view.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/views/extensions/request_file_system_dialog_view.h" 5 #include "chrome/browser/ui/views/extensions/request_file_system_dialog_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cstdlib> 9 #include <cstdlib>
10 10
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 gfx::Insets RequestFileSystemDialogView::GetInsets() const { 88 gfx::Insets RequestFileSystemDialogView::GetInsets() const {
89 return ChromeLayoutProvider::Get()->GetInsetsMetric(views::INSETS_PANEL); 89 return ChromeLayoutProvider::Get()->GetInsetsMetric(views::INSETS_PANEL);
90 } 90 }
91 91
92 RequestFileSystemDialogView::RequestFileSystemDialogView( 92 RequestFileSystemDialogView::RequestFileSystemDialogView(
93 const std::string& extension_name, 93 const std::string& extension_name,
94 const std::string& volume_label, 94 const std::string& volume_label,
95 bool writable, 95 bool writable,
96 const base::Callback<void(ui::DialogButton)>& callback) 96 const base::Callback<void(ui::DialogButton)>& callback)
97 : callback_(callback), contents_view_(new views::View) { 97 : callback_(callback) {
98 DCHECK(!callback_.is_null()); 98 DCHECK(!callback_.is_null());
99 99
100 const base::string16 app_name = base::UTF8ToUTF16(extension_name); 100 const base::string16 app_name = base::UTF8ToUTF16(extension_name);
101 // TODO(mtomasz): Improve the dialog contents, so it's easier for the user 101 // TODO(mtomasz): Improve the dialog contents, so it's easier for the user
102 // to understand what device is being requested. 102 // to understand what device is being requested.
103 const base::string16 volume_name = base::UTF8ToUTF16(volume_label); 103 const base::string16 volume_name = base::UTF8ToUTF16(volume_label);
104 104
105 std::vector<size_t> placeholder_offsets; 105 std::vector<size_t> placeholder_offsets;
106 const base::string16 message = l10n_util::GetStringFUTF16( 106 const base::string16 message = l10n_util::GetStringFUTF16(
107 writable ? IDS_FILE_SYSTEM_REQUEST_FILE_SYSTEM_DIALOG_WRITABLE_MESSAGE 107 writable ? IDS_FILE_SYSTEM_REQUEST_FILE_SYSTEM_DIALOG_WRITABLE_MESSAGE
(...skipping 10 matching lines...) Expand all
118 bold_style); 118 bold_style);
119 label->AddStyleRange( 119 label->AddStyleRange(
120 gfx::Range(placeholder_offsets[1], 120 gfx::Range(placeholder_offsets[1],
121 placeholder_offsets[1] + volume_name.length()), 121 placeholder_offsets[1] + volume_name.length()),
122 bold_style); 122 bold_style);
123 123
124 SetLayoutManager(new views::FillLayout()); 124 SetLayoutManager(new views::FillLayout());
125 125
126 AddChildView(label); 126 AddChildView(label);
127 } 127 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/request_file_system_dialog_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698