summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/chromeos')
-rw-r--r--chrome/browser/chromeos/cros/mock_mount_library.cc4
-rw-r--r--chrome/browser/chromeos/cros/mock_mount_library.h12
-rw-r--r--chrome/browser/chromeos/cros/mount_library.cc196
-rw-r--r--chrome/browser/chromeos/cros/mount_library.h36
-rw-r--r--chrome/browser/chromeos/extensions/file_browser_event_router.cc64
-rw-r--r--chrome/browser/chromeos/extensions/file_browser_event_router.h8
-rw-r--r--chrome/browser/chromeos/status/clock_menu_button.cc1
7 files changed, 251 insertions, 70 deletions
diff --git a/chrome/browser/chromeos/cros/mock_mount_library.cc b/chrome/browser/chromeos/cros/mock_mount_library.cc
index 3e826a3..eca06db 100644
--- a/chrome/browser/chromeos/cros/mock_mount_library.cc
+++ b/chrome/browser/chromeos/cros/mock_mount_library.cc
@@ -40,6 +40,8 @@ MockMountLibrary::MockMountLibrary() {
.WillByDefault(Invoke(this, &MockMountLibrary::RemoveObserverInternal));
ON_CALL(*this, disks())
.WillByDefault(Invoke(this, &MockMountLibrary::disksInternal));
+ ON_CALL(*this, mount_points())
+ .WillByDefault(Invoke(this, &MockMountLibrary::mountPointsInternal));
}
MockMountLibrary::~MockMountLibrary() {
@@ -128,7 +130,7 @@ void MockMountLibrary::SetupDefaultReplies() {
.WillRepeatedly(ReturnRef(disks_));
EXPECT_CALL(*this, RequestMountInfoRefresh())
.Times(AnyNumber());
- EXPECT_CALL(*this, MountPath(_))
+ EXPECT_CALL(*this, MountPath(_, _, _))
.Times(AnyNumber());
EXPECT_CALL(*this, UnmountPath(_))
.Times(AnyNumber());
diff --git a/chrome/browser/chromeos/cros/mock_mount_library.h b/chrome/browser/chromeos/cros/mock_mount_library.h
index c648569..34d06e4 100644
--- a/chrome/browser/chromeos/cros/mock_mount_library.h
+++ b/chrome/browser/chromeos/cros/mock_mount_library.h
@@ -25,9 +25,15 @@ class MockMountLibrary : public MountLibrary {
MOCK_METHOD1(AddObserver, void(MountLibrary::Observer*));
MOCK_METHOD1(RemoveObserver, void(MountLibrary::Observer*));
MOCK_CONST_METHOD0(disks, const MountLibrary::DiskMap&(void));
+ MOCK_CONST_METHOD0(mount_points, const MountLibrary::MountPointMap&(void));
+
+ MOCK_CONST_METHOD1(MountTypeToString, std::string(MountType));
+ MOCK_CONST_METHOD1(MountTypeFromString, MountType(const std::string&));
MOCK_METHOD0(RequestMountInfoRefresh, void(void));
- MOCK_METHOD1(MountPath, void(const char*));
+ MOCK_METHOD3(MountPath, void(const char*,
+ MountType,
+ const MountPathOptions&));
MOCK_METHOD1(UnmountPath, void(const char*));
MOCK_METHOD3(UnmountDeviceRecursive, void(const char*,
MountLibrary::UnmountDeviceRecursiveCallbackType, void*));
@@ -41,6 +47,9 @@ class MockMountLibrary : public MountLibrary {
void AddObserverInternal(MountLibrary::Observer* observer);
void RemoveObserverInternal(MountLibrary::Observer* observer);
const MountLibrary::DiskMap& disksInternal() const { return disks_; }
+ const MountLibrary::MountPointMap& mountPointsInternal() const {
+ return mount_points_;
+ }
void UpdateDeviceChanged(MountLibraryEventType evt,
@@ -52,6 +61,7 @@ class MockMountLibrary : public MountLibrary {
// The list of disks found.
MountLibrary::DiskMap disks_;
+ MountLibrary::MountPointMap mount_points_;
DISALLOW_COPY_AND_ASSIGN(MockMountLibrary);
};
diff --git a/chrome/browser/chromeos/cros/mount_library.cc b/chrome/browser/chromeos/cros/mount_library.cc
index 79e723a..17f6583 100644
--- a/chrome/browser/chromeos/cros/mount_library.cc
+++ b/chrome/browser/chromeos/cros/mount_library.cc
@@ -90,31 +90,56 @@ class MountLibraryImpl : public MountLibrary {
observers_.RemoveObserver(observer);
}
- virtual void MountPath(const char* device_path) OVERRIDE {
+ virtual std::string MountTypeToString(MountType type) const OVERRIDE {
+ switch (type) {
+ case MOUNT_TYPE_DEVICE:
+ return "device";
+ case MOUNT_TYPE_ARCHIVE:
+ return "file";
+ case MOUNT_TYPE_NETWORK_STORAGE:
+ return "network";
+ case MOUNT_TYPE_INVALID:
+ return "invalid";
+ default:
+ NOTREACHED();
+ }
+ return "";
+ }
+
+ virtual MountType MountTypeFromString(const std::string& type_str) const
+ OVERRIDE {
+ if (type_str == "device") {
+ return MOUNT_TYPE_DEVICE;
+ } else if (type_str == "network") {
+ return MOUNT_TYPE_NETWORK_STORAGE;
+ } else if (type_str == "file") {
+ return MOUNT_TYPE_ARCHIVE;
+ } else {
+ return MOUNT_TYPE_INVALID;
+ }
+ }
+
+ virtual void MountPath(const char* source_path,
+ MountType type,
+ const MountPathOptions& options) OVERRIDE {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (!CrosLibrary::Get()->EnsureLoaded()) {
- OnMountRemovableDevice(device_path,
- NULL,
- MOUNT_METHOD_ERROR_LOCAL,
- kLibraryNotLoaded);
+ OnMountCompleted(MOUNT_ERROR_LIBRARY_NOT_LOADED,
+ MountPointInfo(source_path, NULL, type));
return;
}
- MountRemovableDevice(device_path,
- &MountLibraryImpl::MountRemovableDeviceCallback,
- this);
+ MountSourcePath(source_path, type, options, &MountCompletedHandler, this);
}
- virtual void UnmountPath(const char* device_path) OVERRIDE {
+ virtual void UnmountPath(const char* path) OVERRIDE {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (!CrosLibrary::Get()->EnsureLoaded()) {
- OnUnmountRemovableDevice(device_path,
- MOUNT_METHOD_ERROR_LOCAL,
- kLibraryNotLoaded);
+ OnUnmountPath(path,
+ MOUNT_METHOD_ERROR_LOCAL,
+ kLibraryNotLoaded);
return;
}
- UnmountRemovableDevice(device_path,
- &MountLibraryImpl::UnmountRemovableDeviceCallback,
- this);
+ UnmountMountPoint(path, &MountLibraryImpl::UnmountMountPointCallback, this);
}
virtual void UnmountDeviceRecursive(const char* device_path,
@@ -151,9 +176,10 @@ class MountLibraryImpl : public MountLibrary {
cb_data = new UnmountDeviceRecursiveCallbackData(this, user_data,
callback, devices_to_unmount.size());
for (std::vector<const char*>::iterator it = devices_to_unmount.begin();
- it != devices_to_unmount.end();
- ++it) {
- UnmountRemovableDevice(*it,
+ it != devices_to_unmount.end();
+ ++it) {
+ UnmountMountPoint(
+ *it,
&MountLibraryImpl::UnmountDeviceRecursiveCallback,
cb_data);
}
@@ -178,39 +204,34 @@ class MountLibraryImpl : public MountLibrary {
}
const DiskMap& disks() const OVERRIDE { return disks_; }
+ const MountPointMap& mount_points() const OVERRIDE { return mount_points_; }
private:
- // Callback for MountRemovableDevice method.
- static void MountRemovableDeviceCallback(void* object,
- const char* device_path,
- const char* mount_path,
- MountMethodErrorType error,
- const char* error_message) {
+ // Callback for MountComplete signal and MountSourcePath method.
+ static void MountCompletedHandler(void* object,
+ MountError error_code,
+ const char* source_path,
+ MountType type,
+ const char* mount_path) {
DCHECK(object);
MountLibraryImpl* self = static_cast<MountLibraryImpl*>(object);
- self->OnMountRemovableDevice(device_path,
- mount_path,
- error,
- error_message);
+ self->OnMountCompleted(static_cast<MountError>(error_code),
+ MountPointInfo(source_path, mount_path, type));
}
// Callback for UnmountRemovableDevice method.
- static void UnmountRemovableDeviceCallback(void* object,
- const char* device_path,
- const char* mount_path,
- MountMethodErrorType error,
- const char* error_message) {
+ static void UnmountMountPointCallback(void* object,
+ const char* device_path,
+ MountMethodErrorType error,
+ const char* error_message) {
DCHECK(object);
MountLibraryImpl* self = static_cast<MountLibraryImpl*>(object);
- self->OnUnmountRemovableDevice(device_path,
- error,
- error_message);
+ self->OnUnmountPath(device_path, error, error_message);
}
// Callback for UnmountDeviceRecursive.
static void UnmountDeviceRecursiveCallback(void* object,
const char* device_path,
- const char* mount_path,
MountMethodErrorType error,
const char* error_message) {
DCHECK(object);
@@ -218,9 +239,9 @@ class MountLibraryImpl : public MountLibrary {
static_cast<UnmountDeviceRecursiveCallbackData*>(object);
// Do standard processing for Unmount event.
- cb_data->object->OnUnmountRemovableDevice(device_path,
- error,
- error_message);
+ cb_data->object->OnUnmountPath(device_path,
+ error,
+ error_message);
if (error == MOUNT_METHOD_ERROR_LOCAL) {
cb_data->success = false;
} else if (error == MOUNT_METHOD_ERROR_NONE) {
@@ -275,14 +296,26 @@ class MountLibraryImpl : public MountLibrary {
}
- void OnMountRemovableDevice(const char* device_path,
- const char* mount_path,
- MountMethodErrorType error,
- const char* error_message) {
- DCHECK(device_path);
+ void OnMountCompleted(MountError error_code,
+ const MountPointInfo& mount_info) {
+ DCHECK(!mount_info.source_path.empty());
- if (error == MOUNT_METHOD_ERROR_NONE && device_path && mount_path) {
- std::string path(device_path);
+ FireMountCompleted(MOUNTING,
+ error_code,
+ mount_info);
+
+ if (error_code == MOUNT_ERROR_NONE &&
+ mount_points_.find(mount_info.source_path) == mount_points_.end()) {
+ mount_points_.insert(MountPointMap::value_type(
+ mount_info.source_path.c_str(),
+ mount_info));
+ }
+
+ if (error_code == MOUNT_ERROR_NONE &&
+ mount_info.mount_type == MOUNT_TYPE_DEVICE &&
+ !mount_info.source_path.empty() &&
+ !mount_info.mount_path.empty()) {
+ std::string path(mount_info.source_path);
DiskMap::iterator iter = disks_.find(path);
if (iter == disks_.end()) {
// disk might have been removed by now?
@@ -290,21 +323,30 @@ class MountLibraryImpl : public MountLibrary {
}
Disk* disk = iter->second;
DCHECK(disk);
- disk->set_mount_path(mount_path);
+ disk->set_mount_path(mount_info.mount_path.c_str());
FireDiskStatusUpdate(MOUNT_DISK_MOUNTED, disk);
- } else {
- LOG(WARNING) << "Mount request failed for device "
- << device_path << ", with error: "
- << (error_message ? error_message : "Unknown");
}
}
- void OnUnmountRemovableDevice(const char* device_path,
- MountMethodErrorType error,
- const char* error_message) {
- DCHECK(device_path);
- if (error == MOUNT_METHOD_ERROR_NONE && device_path) {
- std::string path(device_path);
+ void OnUnmountPath(const char* source_path,
+ MountMethodErrorType error,
+ const char* error_message) {
+ DCHECK(source_path);
+
+ if (error == MOUNT_METHOD_ERROR_NONE && source_path) {
+ MountPointMap::iterator mount_points_it = mount_points_.find(source_path);
+ if (mount_points_it == mount_points_.end())
+ return;
+ // TODO(tbarzic): Add separate, PathUnmounted event to Observer.
+ FireMountCompleted(
+ UNMOUNTING,
+ MOUNT_ERROR_NONE,
+ MountPointInfo(mount_points_it->second.source_path.c_str(),
+ mount_points_it->second.mount_path.c_str(),
+ mount_points_it->second.mount_type));
+ mount_points_.erase(mount_points_it);
+
+ std::string path(source_path);
DiskMap::iterator iter = disks_.find(path);
if (iter == disks_.end()) {
// disk might have been removed by now?
@@ -316,7 +358,7 @@ class MountLibraryImpl : public MountLibrary {
FireDiskStatusUpdate(MOUNT_DISK_UNMOUNTED, disk);
} else {
LOG(WARNING) << "Unmount request failed for device "
- << device_path << ", with error: "
+ << source_path << ", with error: "
<< (error_message ? error_message : "Unknown");
}
}
@@ -476,16 +518,17 @@ class MountLibraryImpl : public MountLibrary {
type = MOUNT_DEVICE_SCANNED;
break;
}
- default:
+ default: {
return;
+ }
}
FireDeviceStatusUpdate(type, std::string(device_path));
}
void Init() {
// Getting the monitor status so that the daemon starts up.
- mount_status_connection_ = MonitorMountEvents(
- &MonitorMountEventsHandler, this);
+ mount_status_connection_ = MonitorAllMountEvents(
+ &MonitorMountEventsHandler, &MountCompletedHandler, this);
}
void FireDiskStatusUpdate(MountLibraryEventType evt,
@@ -504,6 +547,17 @@ class MountLibraryImpl : public MountLibrary {
Observer, observers_, DeviceChanged(evt, device_path));
}
+ void FireMountCompleted(MountEvent event_type,
+ MountError error_code,
+ const MountPointInfo& mount_info) {
+ // Make sure we run on UI thread.
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ FOR_EACH_OBSERVER(
+ Observer, observers_, MountCompleted(event_type,
+ error_code,
+ mount_info));
+ }
+
// Mount event change observers.
ObserverList<Observer> observers_;
@@ -514,6 +568,8 @@ class MountLibraryImpl : public MountLibrary {
// The list of disks found.
MountLibrary::DiskMap disks_;
+ MountLibrary::MountPointMap mount_points_;
+
DISALLOW_COPY_AND_ASSIGN(MountLibraryImpl);
};
@@ -526,9 +582,20 @@ class MountLibraryStubImpl : public MountLibrary {
virtual void AddObserver(Observer* observer) OVERRIDE {}
virtual void RemoveObserver(Observer* observer) OVERRIDE {}
virtual const DiskMap& disks() const OVERRIDE { return disks_; }
+ virtual const MountPointMap& mount_points() const OVERRIDE {
+ return mount_points_;
+ }
+ virtual std::string MountTypeToString(MountType type) const OVERRIDE {
+ return "";
+ }
+ virtual MountType MountTypeFromString(const std::string& type_str) const
+ OVERRIDE {
+ return MOUNT_TYPE_INVALID;
+ }
virtual void RequestMountInfoRefresh() OVERRIDE {}
- virtual void MountPath(const char* device_path) OVERRIDE {}
- virtual void UnmountPath(const char* device_path) OVERRIDE {}
+ virtual void MountPath(const char* source_path, MountType type,
+ const MountPathOptions& options) OVERRIDE {}
+ virtual void UnmountPath(const char* path) OVERRIDE {}
virtual void UnmountDeviceRecursive(const char* device_path,
UnmountDeviceRecursiveCallbackType callback, void* user_data)
OVERRIDE {}
@@ -536,6 +603,7 @@ class MountLibraryStubImpl : public MountLibrary {
private:
// The list of disks found.
DiskMap disks_;
+ MountPointMap mount_points_;
DISALLOW_COPY_AND_ASSIGN(MountLibraryStubImpl);
};
diff --git a/chrome/browser/chromeos/cros/mount_library.h b/chrome/browser/chromeos/cros/mount_library.h
index b735d3d..c6dc15e 100644
--- a/chrome/browser/chromeos/cros/mount_library.h
+++ b/chrome/browser/chromeos/cros/mount_library.h
@@ -6,8 +6,8 @@
#define CHROME_BROWSER_CHROMEOS_CROS_MOUNT_LIBRARY_H_
#pragma once
-#include <string>
#include <map>
+#include <string>
#include "base/memory/singleton.h"
#include "base/observer_list.h"
@@ -32,6 +32,10 @@ typedef enum MountLibraryEventType {
// library class like this: chromeos::CrosLibrary::Get()->GetMountLibrary()
class MountLibrary {
public:
+ enum MountEvent {
+ MOUNTING,
+ UNMOUNTING
+ };
// Used to house an instance of each found mount device.
class Disk {
public:
@@ -97,6 +101,22 @@ class MountLibrary {
};
typedef std::map<std::string, Disk*> DiskMap;
+ // MountPointInfo: {mount_path, mount_type}.
+ struct MountPointInfo {
+ std::string source_path;
+ std::string mount_path;
+ MountType mount_type;
+
+ MountPointInfo(const char* source, const char* mount, const MountType type)
+ : source_path(source ? source : ""),
+ mount_path(mount ? mount : ""),
+ mount_type(type) {
+ }
+ };
+
+ // MountPointMap key is source_path.
+ typedef std::map<std::string, MountPointInfo> MountPointMap;
+
typedef void(*UnmountDeviceRecursiveCallbackType)(void*, bool);
class Observer {
@@ -107,16 +127,26 @@ class MountLibrary {
const Disk* disk) = 0;
virtual void DeviceChanged(MountLibraryEventType event,
const std::string& device_path ) = 0;
+ virtual void MountCompleted(MountEvent event_type,
+ MountError error_code,
+ const MountPointInfo& mount_info) = 0;
};
virtual ~MountLibrary() {}
virtual void AddObserver(Observer* observer) = 0;
virtual void RemoveObserver(Observer* observer) = 0;
virtual const DiskMap& disks() const = 0;
+ virtual const MountPointMap& mount_points() const = 0;
+
+ virtual std::string MountTypeToString(MountType type) const = 0;
+ virtual MountType MountTypeFromString(const std::string& type_str) const = 0;
virtual void RequestMountInfoRefresh() = 0;
- virtual void MountPath(const char* device_path) = 0;
- virtual void UnmountPath(const char* device_path) = 0;
+ virtual void MountPath(const char* source_path,
+ MountType type,
+ const MountPathOptions& options) = 0;
+ // |path| may be source od mount path.
+ virtual void UnmountPath(const char* path) = 0;
// Unmounts device_poath and all of its known children.
virtual void UnmountDeviceRecursive(const char* device_path,
diff --git a/chrome/browser/chromeos/extensions/file_browser_event_router.cc b/chrome/browser/chromeos/extensions/file_browser_event_router.cc
index df0d61e..91d7216 100644
--- a/chrome/browser/chromeos/extensions/file_browser_event_router.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_event_router.cc
@@ -54,6 +54,28 @@ DictionaryValue* DiskToDictionaryValue(
return result;
}
+const char* MountErrorToString(chromeos::MountError error) {
+ switch (error) {
+ case chromeos::MOUNT_ERROR_NONE:
+ return "success";
+ case chromeos::MOUNT_ERROR_UNKNOWN:
+ return "error_unknown";
+ case chromeos::MOUNT_ERROR_INTERNAL:
+ return "error_internal";
+ case chromeos::MOUNT_ERROR_UNKNOWN_FILESYSTEM:
+ return "error_unknown_filesystem";
+ case chromeos::MOUNT_ERROR_UNSUPORTED_FILESYSTEM:
+ return "error_unsuported_filesystem";
+ case chromeos::MOUNT_ERROR_INVALID_ARCHIVE:
+ return "error_invalid_archive";
+ case chromeos::MOUNT_ERROR_LIBRARY_NOT_LOADED:
+ return "error_libcros_missing";
+ default:
+ NOTREACHED();
+ }
+ return "";
+}
+
ExtensionFileBrowserEventRouter::ExtensionFileBrowserEventRouter(
Profile* profile)
: delegate_(new ExtensionFileBrowserEventRouter::FileWatcherDelegate(this)),
@@ -153,6 +175,13 @@ void ExtensionFileBrowserEventRouter::DeviceChanged(
}
}
+void ExtensionFileBrowserEventRouter::MountCompleted(
+ chromeos::MountLibrary::MountEvent event_type,
+ chromeos::MountError error_code,
+ const chromeos::MountLibrary::MountPointInfo& mount_info) {
+ DispatchMountCompletedEvent(event_type, error_code, mount_info);
+}
+
void ExtensionFileBrowserEventRouter::HandleFileWatchNotification(
const FilePath& local_path, bool got_error) {
base::AutoLock lock(lock_);
@@ -218,6 +247,37 @@ void ExtensionFileBrowserEventRouter::DispatchMountEvent(
GURL());
}
+void ExtensionFileBrowserEventRouter::DispatchMountCompletedEvent(
+ chromeos::MountLibrary::MountEvent event,
+ chromeos::MountError error_code,
+ const chromeos::MountLibrary::MountPointInfo& mount_info) {
+ if (!profile_ || mount_info.mount_type == chromeos::MOUNT_TYPE_INVALID) {
+ NOTREACHED();
+ return;
+ }
+
+ ListValue args;
+ DictionaryValue* mount_info_value = new DictionaryValue();
+ args.Append(mount_info_value);
+ mount_info_value->SetString("sourcePath", mount_info.source_path);
+ if (event == chromeos::MountLibrary::MOUNTING) {
+ mount_info_value->SetString("eventType", "mount");
+ } else {
+ mount_info_value->SetString("eventType", "unmount");
+ }
+ mount_info_value->SetString("status", MountErrorToString(error_code));
+ chromeos::MountLibrary* lib = chromeos::CrosLibrary::Get()->GetMountLibrary();
+ mount_info_value->SetString("mountType",
+ lib->MountTypeToString(mount_info.mount_type));
+ mount_info_value->SetString("mountPath", mount_info.mount_path);
+
+ std::string args_json;
+ base::JSONWriter::Write(&args, false /* pretty_print */, &args_json);
+ profile_->GetExtensionEventRouter()->DispatchEventToRenderers(
+ extension_event_names::kOnFileBrowserMountCompleted, args_json, NULL,
+ GURL());
+}
+
void ExtensionFileBrowserEventRouter::OnDiskAdded(
const chromeos::MountLibrary::Disk* disk) {
VLOG(1) << "Disk added: " << disk->device_path();
@@ -237,7 +297,9 @@ void ExtensionFileBrowserEventRouter::OnDiskAdded(
// Initiate disk mount operation.
chromeos::MountLibrary* lib =
chromeos::CrosLibrary::Get()->GetMountLibrary();
- lib->MountPath(disk->device_path().c_str());
+ lib->MountPath(disk->device_path().c_str(),
+ chromeos::MOUNT_TYPE_DEVICE,
+ chromeos::MountPathOptions()); // Unused.
}
}
diff --git a/chrome/browser/chromeos/extensions/file_browser_event_router.h b/chrome/browser/chromeos/extensions/file_browser_event_router.h
index fb8047d..5378372 100644
--- a/chrome/browser/chromeos/extensions/file_browser_event_router.h
+++ b/chrome/browser/chromeos/extensions/file_browser_event_router.h
@@ -46,6 +46,10 @@ class ExtensionFileBrowserEventRouter
const chromeos::MountLibrary::Disk* disk) OVERRIDE;
virtual void DeviceChanged(chromeos::MountLibraryEventType event,
const std::string& device_path) OVERRIDE;
+ virtual void MountCompleted(chromeos::MountLibrary::MountEvent event_type,
+ chromeos::MountError error_code,
+ const chromeos::MountLibrary::MountPointInfo& mount_info)
+ OVERRIDE;
private:
typedef std::map<std::string, linked_ptr<chromeos::SystemNotification> >
@@ -103,6 +107,10 @@ class ExtensionFileBrowserEventRouter
// Sends filesystem changed extension message to all renderers.
void DispatchMountEvent(const chromeos::MountLibrary::Disk* disk, bool added);
+ void DispatchMountCompletedEvent(chromeos::MountLibrary::MountEvent event,
+ chromeos::MountError error_code,
+ const chromeos::MountLibrary::MountPointInfo& mount_info);
+
void RemoveBrowserFromVector(const std::string& path);
// Used to create a window of a standard size, and add it to a list
diff --git a/chrome/browser/chromeos/status/clock_menu_button.cc b/chrome/browser/chromeos/status/clock_menu_button.cc
index 5361bbd..af4579e 100644
--- a/chrome/browser/chromeos/status/clock_menu_button.cc
+++ b/chrome/browser/chromeos/status/clock_menu_button.cc
@@ -83,6 +83,7 @@ void ClockMenuButton::UpdateTextAndSetNextTimer() {
}
void ClockMenuButton::UpdateText() {
+ return;
base::Time time(base::Time::Now());
// If the profie is present, check the use 24-hour clock preference.
const bool use_24hour_clock =