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

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

Issue 8609002: CrOs: Remove 16 exit time destructors and 11 static initializers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/chromeos/change_picture_options_handle r.h" 5 #include "chrome/browser/ui/webui/options/chromeos/change_picture_options_handle r.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 if (!select_file_dialog_.get()) 135 if (!select_file_dialog_.get())
136 select_file_dialog_ = SelectFileDialog::Create(this); 136 select_file_dialog_ = SelectFileDialog::Create(this);
137 137
138 FilePath downloads_path; 138 FilePath downloads_path;
139 if (!PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_path)) { 139 if (!PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_path)) {
140 NOTREACHED(); 140 NOTREACHED();
141 return; 141 return;
142 } 142 }
143 143
144 // Static so we initialize it only once. 144 // Static so we initialize it only once.
145 static SelectFileDialog::FileTypeInfo file_type_info = 145 CR_DEFINE_STATIC_LOCAL(SelectFileDialog::FileTypeInfo, file_type_info,
146 GetUserImageFileTypeInfo(); 146 (GetUserImageFileTypeInfo()));
147 147
148 select_file_dialog_->SelectFile( 148 select_file_dialog_->SelectFile(
149 SelectFileDialog::SELECT_OPEN_FILE, 149 SelectFileDialog::SELECT_OPEN_FILE,
150 l10n_util::GetStringUTF16(IDS_DOWNLOAD_TITLE), 150 l10n_util::GetStringUTF16(IDS_DOWNLOAD_TITLE),
151 downloads_path, 151 downloads_path,
152 &file_type_info, 152 &file_type_info,
153 0, 153 0,
154 FILE_PATH_LITERAL(""), 154 FILE_PATH_LITERAL(""),
155 web_ui_->tab_contents(), 155 web_ui_->tab_contents(),
156 GetBrowserWindow(), 156 GetBrowserWindow(),
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 326
327 gfx::NativeWindow ChangePictureOptionsHandler::GetBrowserWindow() const { 327 gfx::NativeWindow ChangePictureOptionsHandler::GetBrowserWindow() const {
328 Browser* browser = 328 Browser* browser =
329 BrowserList::FindBrowserWithProfile(Profile::FromWebUI(web_ui_)); 329 BrowserList::FindBrowserWithProfile(Profile::FromWebUI(web_ui_));
330 if (!browser) 330 if (!browser)
331 return NULL; 331 return NULL;
332 return browser->window()->GetNativeHandle(); 332 return browser->window()->GetNativeHandle();
333 } 333 }
334 334
335 } // namespace chromeos 335 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698