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

Side by Side Diff: chrome/browser/automation/testing_automation_provider_chromeos.cc

Issue 105193002: Replace string16 with base::string16. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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/automation/testing_automation_provider.h" 5 #include "chrome/browser/automation/testing_automation_provider.h"
6 6
7 #include "ash/new_window_delegate.h" 7 #include "ash/new_window_delegate.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/system/tray/system_tray_delegate.h" 9 #include "ash/system/tray/system_tray_delegate.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 506
507 void TestingAutomationProvider::GetTimeInfo(Browser* browser, 507 void TestingAutomationProvider::GetTimeInfo(Browser* browser,
508 DictionaryValue* args, 508 DictionaryValue* args,
509 IPC::Message* reply_message) { 509 IPC::Message* reply_message) {
510 scoped_ptr<DictionaryValue> return_value(new DictionaryValue); 510 scoped_ptr<DictionaryValue> return_value(new DictionaryValue);
511 base::Time time(base::Time::Now()); 511 base::Time time(base::Time::Now());
512 bool use_24hour_clock = browser && browser->profile()->GetPrefs()->GetBoolean( 512 bool use_24hour_clock = browser && browser->profile()->GetPrefs()->GetBoolean(
513 prefs::kUse24HourClock); 513 prefs::kUse24HourClock);
514 base::HourClockType hour_clock_type = 514 base::HourClockType hour_clock_type =
515 use_24hour_clock ? base::k24HourClock : base::k12HourClock; 515 use_24hour_clock ? base::k24HourClock : base::k12HourClock;
516 string16 display_time = base::TimeFormatTimeOfDayWithHourClockType( 516 base::string16 display_time = base::TimeFormatTimeOfDayWithHourClockType(
517 time, hour_clock_type, base::kDropAmPm); 517 time, hour_clock_type, base::kDropAmPm);
518 string16 timezone = 518 base::string16 timezone =
519 chromeos::system::TimezoneSettings::GetInstance()->GetCurrentTimezoneID(); 519 chromeos::system::TimezoneSettings::GetInstance()->GetCurrentTimezoneID();
520 return_value->SetString("display_time", display_time); 520 return_value->SetString("display_time", display_time);
521 return_value->SetString("display_date", base::TimeFormatFriendlyDate(time)); 521 return_value->SetString("display_date", base::TimeFormatFriendlyDate(time));
522 return_value->SetString("timezone", timezone); 522 return_value->SetString("timezone", timezone);
523 AutomationJSONReply(this, reply_message).SendSuccess(return_value.get()); 523 AutomationJSONReply(this, reply_message).SendSuccess(return_value.get());
524 } 524 }
525 525
526 void TestingAutomationProvider::GetTimeInfo(DictionaryValue* args, 526 void TestingAutomationProvider::GetTimeInfo(DictionaryValue* args,
527 IPC::Message* reply_message) { 527 IPC::Message* reply_message) {
528 GetTimeInfo(NULL, args, reply_message); 528 GetTimeInfo(NULL, args, reply_message);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 606
607 void TestingAutomationProvider::AddChromeosObservers() { 607 void TestingAutomationProvider::AddChromeosObservers() {
608 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> 608 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
609 AddObserver(this); 609 AddObserver(this);
610 } 610 }
611 611
612 void TestingAutomationProvider::RemoveChromeosObservers() { 612 void TestingAutomationProvider::RemoveChromeosObservers() {
613 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> 613 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
614 RemoveObserver(this); 614 RemoveObserver(this);
615 } 615 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698