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

Side by Side Diff: chrome/browser/ui/webui/options2/chromeos/change_picture_options_handler2.cc

Issue 10391044: retry 136193 - convert localStrings to loadTimeData for options page (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 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 | Annotate | Revision Log
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/options2/chromeos/change_picture_options_handl er2.h" 5 #include "chrome/browser/ui/webui/options2/chromeos/change_picture_options_handl er2.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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 localized_strings->SetString("takePhoto", 87 localized_strings->SetString("takePhoto",
88 l10n_util::GetStringUTF16(IDS_OPTIONS_CHANGE_PICTURE_TAKE_PHOTO)); 88 l10n_util::GetStringUTF16(IDS_OPTIONS_CHANGE_PICTURE_TAKE_PHOTO));
89 localized_strings->SetString("chooseFile", 89 localized_strings->SetString("chooseFile",
90 l10n_util::GetStringUTF16(IDS_OPTIONS_CHANGE_PICTURE_CHOOSE_FILE)); 90 l10n_util::GetStringUTF16(IDS_OPTIONS_CHANGE_PICTURE_CHOOSE_FILE));
91 localized_strings->SetString("profilePhoto", 91 localized_strings->SetString("profilePhoto",
92 l10n_util::GetStringUTF16(IDS_OPTIONS_CHANGE_PICTURE_PROFILE_PHOTO)); 92 l10n_util::GetStringUTF16(IDS_OPTIONS_CHANGE_PICTURE_PROFILE_PHOTO));
93 localized_strings->SetString("profilePhotoLoading", 93 localized_strings->SetString("profilePhotoLoading",
94 l10n_util::GetStringUTF16( 94 l10n_util::GetStringUTF16(
95 IDS_OPTIONS_CHANGE_PICTURE_PROFILE_LOADING_PHOTO)); 95 IDS_OPTIONS_CHANGE_PICTURE_PROFILE_LOADING_PHOTO));
96 96
97 localized_strings->SetString("userIsEphemeral", 97 localized_strings->SetBoolean("userIsEphemeral",
98 UserManager::Get()->IsCurrentUserEphemeral() ? 98 UserManager::Get()->IsCurrentUserEphemeral());
99 ASCIIToUTF16("true") : ASCIIToUTF16("false"));
100 } 99 }
101 100
102 void ChangePictureOptionsHandler::RegisterMessages() { 101 void ChangePictureOptionsHandler::RegisterMessages() {
103 web_ui()->RegisterMessageCallback("chooseFile", 102 web_ui()->RegisterMessageCallback("chooseFile",
104 base::Bind(&ChangePictureOptionsHandler::HandleChooseFile, 103 base::Bind(&ChangePictureOptionsHandler::HandleChooseFile,
105 base::Unretained(this))); 104 base::Unretained(this)));
106 web_ui()->RegisterMessageCallback("takePhoto", 105 web_ui()->RegisterMessageCallback("takePhoto",
107 base::Bind(&ChangePictureOptionsHandler::HandleTakePhoto, 106 base::Bind(&ChangePictureOptionsHandler::HandleTakePhoto,
108 base::Unretained(this))); 107 base::Unretained(this)));
109 web_ui()->RegisterMessageCallback("onChangePicturePageShown", 108 web_ui()->RegisterMessageCallback("onChangePicturePageShown",
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 gfx::NativeWindow ChangePictureOptionsHandler::GetBrowserWindow() const { 340 gfx::NativeWindow ChangePictureOptionsHandler::GetBrowserWindow() const {
342 Browser* browser = 341 Browser* browser =
343 BrowserList::FindBrowserWithProfile(Profile::FromWebUI(web_ui())); 342 BrowserList::FindBrowserWithProfile(Profile::FromWebUI(web_ui()));
344 if (!browser) 343 if (!browser)
345 return NULL; 344 return NULL;
346 return browser->window()->GetNativeHandle(); 345 return browser->window()->GetNativeHandle();
347 } 346 }
348 347
349 } // namespace options2 348 } // namespace options2
350 } // namespace chromeos 349 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698