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

Side by Side Diff: chromeos/dbus/update_engine_client.cc

Issue 2338063002: chromeos: Refactor D-Bus client type enum and stub vs. fake naming (Closed)
Patch Set: review comments Created 4 years, 3 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 | « chromeos/dbus/update_engine_client.h ('k') | content/shell/browser/shell_browser_main_parts.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chromeos/dbus/update_engine_client.h" 5 #include "chromeos/dbus/update_engine_client.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 UpdateEngineClient::UpdateCheckCallback 593 UpdateEngineClient::UpdateCheckCallback
594 UpdateEngineClient::EmptyUpdateCheckCallback() { 594 UpdateEngineClient::EmptyUpdateCheckCallback() {
595 return base::Bind(&EmptyUpdateCheckCallbackBody); 595 return base::Bind(&EmptyUpdateCheckCallbackBody);
596 } 596 }
597 597
598 // static 598 // static
599 UpdateEngineClient* UpdateEngineClient::Create( 599 UpdateEngineClient* UpdateEngineClient::Create(
600 DBusClientImplementationType type) { 600 DBusClientImplementationType type) {
601 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) 601 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION)
602 return new UpdateEngineClientImpl(); 602 return new UpdateEngineClientImpl();
603 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); 603 DCHECK_EQ(FAKE_DBUS_CLIENT_IMPLEMENTATION, type);
604 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 604 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
605 switches::kTestAutoUpdateUI)) 605 switches::kTestAutoUpdateUI))
606 return new UpdateEngineClientFakeImpl(); 606 return new UpdateEngineClientFakeImpl();
607 else 607 else
608 return new UpdateEngineClientStubImpl(); 608 return new UpdateEngineClientStubImpl();
609 } 609 }
610 610
611 // static 611 // static
612 bool UpdateEngineClient::IsTargetChannelMoreStable( 612 bool UpdateEngineClient::IsTargetChannelMoreStable(
613 const std::string& current_channel, 613 const std::string& current_channel,
614 const std::string& target_channel) { 614 const std::string& target_channel) {
615 const char** cix = std::find( 615 const char** cix = std::find(
616 kReleaseChannelsList, 616 kReleaseChannelsList,
617 kReleaseChannelsList + arraysize(kReleaseChannelsList), current_channel); 617 kReleaseChannelsList + arraysize(kReleaseChannelsList), current_channel);
618 const char** tix = std::find( 618 const char** tix = std::find(
619 kReleaseChannelsList, 619 kReleaseChannelsList,
620 kReleaseChannelsList + arraysize(kReleaseChannelsList), target_channel); 620 kReleaseChannelsList + arraysize(kReleaseChannelsList), target_channel);
621 return tix > cix; 621 return tix > cix;
622 } 622 }
623 623
624 } // namespace chromeos 624 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/update_engine_client.h ('k') | content/shell/browser/shell_browser_main_parts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698